sbmandav sbmandav - 2 years ago 168
iOS Question

how to hide empty rows in a UITableView and change the height of the Uitableview based on non-empty rows

I have couple of problems with my


  1. When I add a
    on my page, by default it brings up some fixed number of rows,
    even though I set number of rows in section as
    . All the rows appear except the first row, and all are empty rows. So, I want to hide all the empty rows in the

  2. Based on the non-empty rows, I want to change the height of my

Answer Source

You sure you are using UITableViewStyleGrouped style?

Because by default it is set to UITableViewStylePlain which shows empty cells too after displaying filled cells.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download