iOS Auto Layout Constraint's Jumping After View Has Loaded

ε祈祈猫儿з 提交于 2019-12-05 21:42:27

This is not a constraint issue. Your view is going under the navigation bar. You can fix it in storyboard by unchecking "Extend Edges - Under Top Bar" in Page View Controller scene. In code

- (void)viewDidLoad {
   [super viewDidLoad];
   self.edgesForExtendedLayout = UIRectEdgeNone;
}

Hari Kunwar's answer didn't work for me, though.

What worked for was changing the top constraint of my view (The one that jumped.. which is also the one on the top).

My top constraint was to top layout guide - I removed it and now when I added, I chose the little arrow near the constraint constant and chose view instead of top layout guide...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!