views:

390

answers:

2

I have created UITableViewController based class with XIB. In XIB I have changed style to "Grouped". Unfortunately, when I build the application, the table turns out to by "Plain". What might be a problem?

I have tried "Cleaning all targets". No success.

alt text

alt text

EDIT: Problem solved. As you know you have to add the view to the parent controller xib. This time setting type of the controller wasn't enough. I also had to provide xib path. That fixes the problem.

A: 

Override this method to specify number of groups

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return [Arr count];
}

return the number of groups here

Saurabh
Does not work. Table shows sections in plain style. I included the screenshot.
Jacek
Try to set - tableview.sectionFooterHeight=10;tableview.sectionHeaderHeight=10;If this does not work please post your code.
Saurabh
try to create your table using - (id)initWithFrame:(CGRect)frame style:(UITableViewStyle)styleset style to - UITableViewStyleGroupedhttp://developer.apple.com/iphone/library/documentation/uikit/reference/UITableView_Class/Reference/Reference.html#//apple_ref/occ/instm/UITableView/initWithFrame:style:
Saurabh
+1  A: 

Try resetting the simulator, and restarting the sim and xcode.

cannyboy