美文网首页
处理scrollview和tableview偏移64个像素的处理

处理scrollview和tableview偏移64个像素的处理

作者: the_road | 来源:发表于2017-07-31 13:28 被阅读0次

方法1:

在所有的 viewController 里都加上

这样所有设备下都是固定 64的位置开始。

- (void)viewDidLoad {

[super viewDidLoad];

// Do any additional setup after loading the view.

// 设置CGRectZero从导航栏下开始计算

if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {

self.edgesForExtendedLayout = UIRectEdgeNone;

}

}

方法2:

self.navigationController.navigationBar.translucent=NO;

2种方法比较推荐第1种。

原链接:http://www.cocoachina.com/bbs/read.php?tid-246393.html

相关文章

网友评论

      本文标题:处理scrollview和tableview偏移64个像素的处理

      本文链接:https://www.haomeiwen.com/subject/mstrlxtx.html