After some investigation , I found out it is to do with the way I create the view object.
I was using something like the following to create the table view.
TableView *view = [TableView alloc] init];
In this way, the UITableView's style will always be set to UITableViewStylePlain, the correct way to do it is
TableView *view = [TableView alloc] initWithStyle:UITableViewStyleGrouped];
or TableView *view = [TableView alloc] initWithNibName:@"MyTableView" bundle:nil];
It is a simple issue, but just write down in case somebody else is still wandering... The final result should looks like the following.
No comments:
Post a Comment