之前一直说用
self.automaticallyAdjustsScrollViewInsets =NO;
self.navigationController.automaticallyAdjustsScrollViewInsets =NO;
现在加上这两句也不顶用了
得加上下面的
if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {
self.edgesForExtendedLayout =UIRectEdgeNone;
}
或者这句
self.navigationController.navigationBar.translucent = NO;