Handling empty UITableView in UITableViewController

Posted by Travis on Stack Overflow See other posts from Stack Overflow or by Travis
Published on 2010-03-22T05:49:16Z Indexed on 2010/03/22 5:51 UTC
Read the original article Hit count: 454

I have a UITableViewController that is populated with some data. If the data comes back empty, obviously the table is empty. What is the appropriate method to use to handle this case and put up something like a UILabel with "No Data Available".

I have been using - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section but it's proven a bit cumbersome and I'm not longer confident it's the best place to do this.

© Stack Overflow or respective owner

Related posts about iphone-sdk

Related posts about uitableview