How to hide a section in UITableView?

iphone, iphone-sdk-3.0

Solution

You can't "hide" a section as such, but you can "delete" it from the table view using the `deleteSections:withRowAnimation:` method. This will remove it from the view, with an optional animation, without affecting your backing data. (You should, however, update the data anyway so that the section doesn't reappear.)

More info: UITableView class reference

Problem

There are some section in the table that does not contain any data and would like to hide that section. How to do this?

Original source

Related problems