I am trying to display data from a mysql database on my server. I am loading the data into a table. The problem is, I don't want this data to be the only thing on the view. I want the table to be shared with other content. Ideally, I would like the table to be able to grow and expand with how many cells their are. So if there are 3 cells, I would like it to grow to fit all 3. If there are 10, I would like it to grow to fit all 10.
It looks like Apple does this a lot. A major place I notice it is in their contacts, the phone numbers table grows and shrinks depending on how many numbers there are.
with bellow code your tableview size decide with its content...
tableView.frame = CGRectMake(tableView.frame.origin.x, tableView.frame.origin.y, tableView.frame.size.width, tableView.contentSize.height);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With