In my view with a navigation bar, I THINK but not sure, that the empty spaces above and below my table are the header and footer. I've tried all possible options to set them to nothing but they still show up like this:
The same gap is at the top below the "Private Messages" nav bar. When I start to scroll:
it takes up the entire view. Why doesn't it initially take up the entire area? In the Size Inspector Header and Footer are set to 1. I'm pretty sure it has something to do with the header and footer. Any suggestions please?
It is dark Cocoa magic :)
Add
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.automaticallyAdjustsScrollViewInsets = NO;
... your additional code
}
return self;
}
to your view controller.
UPDATE: (from iOS7CourseSlides.pdf )
self.automaticallyAdjustsScrollViewInsets = YES;
is the same as
self.automaticallyAdjustsScrollViewInsets = NO;
self.contentSubview.contentInset = UIEdgeInsetsMake(64, 0, 0, 0);
self.contentSubview.contentOffset = CGPointMake(0, -64);
So you can use the approach you like more.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.