Starting in iOS7, there is additional space at the top of my UITableView
\'s which have a style UITableViewStyleGrouped
.
Here is an example:<
I'm assuming that is just part of the new UITableViewStyleGrouped
styling. It is in all grouped table views and there doesn't seem to be any direct way to control that space.
If that space is being represented by a UIView
, it would be possible to search through all the subviews
of the UITableView
to find that specific view and edit it directly. However, there is also the possibility that that space is just a hardcoded offset before headers and cells start and there won't be any way to edit it.
To search through all subviews (I would run this code when the table has no cells, to make it a little easier to read the output):
- (void)listSubviewsOfView:(UIView *)view {
// Get the subviews of the view
NSArray *subviews = [view subviews];
// Return if there are no subviews
if ([subviews count] == 0) return;
for (UIView *subview in subviews) {
NSLog(@"%@", subview);
// List the subviews of subview
[self listSubviewsOfView:subview];
}
}