UITableview sections (Xcode 4.5 and iOS6)-Collection of common programming errors
You supply all of that information at runtime, generally from the view controller. You need to set your view controller as the table view’s ‘data source’, then implement the UITableViewDataSource protocol which is documented here:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableViewDataSource_Protocol/Reference/Reference.html
The specific method that will determine how many sections are presented is this one:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 2;
}