How do I resize table to fit contents?

Discussion in 'iOS Programming' started by mrl72, Jan 9, 2011.

  1. macrumors regular

    Joined:
    Apr 20, 2008
    #1
    I have a UITableView sitting on a view that has cells and rows dynamically created. Since I have a custom background on the view I want the table to automatically resize to fit the content. So for example if I only have 5 rows that take up 1/4 of the screen right now my table is stretching to the bottom of the screen, I really want it to stop after the last row in the table.

    I have tried UIViewAutoresizingFlexibleHeight but that didn't seem to do anything.

    Cheers.
     

Share This Page