Closed guifw001 closed 7 years ago
是因为UINavigationController下的UIViewController的self.view的第一个UIScrollView会被偏移。可以这么设置
- (void)viewDidLoad {
[super viewDidLoad];
//view置顶
self.edgesForExtendedLayout = UIRectEdgeAll;
self.extendedLayoutIncludesOpaqueBars = YES;
//解决首个scrollView引发的偏移
self.automaticallyAdjustsScrollViewInsets = NO;
[self.view addSubview:[UIScrollView new]];
self.view.backgroundColor = [UIColor whiteColor];
}
@iCoobin 谢谢你的答案, 是这原因引起的,昨天发现原因之后 就把这个问题给关了!
UITextField 用SDAutolayout布局 会出现标题的bug,设置Frame不会出现这个问题. 这个如何解决?
IOS 8.2 SDAutolayout 2.1.8 Xcdoe 8.3.3