ssabetan
ssabetan

Reputation: 111

iOS Auto Layout Constraint's Jumping After View Has Loaded

Made a quick video demonstrating the issue here: https://vid.me/9kB5

When I remove the constraints the text does not jump upon loading the view. But then it defeats the purpose.

When I setup the constraints I used "Reset to Suggested Constraints"

Any ideas?

Upvotes: 3

Views: 941

Answers (2)

RawKnee
RawKnee

Reputation: 323

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...

Upvotes: 0

Hari Kunwar
Hari Kunwar

Reputation: 1681

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;
}

Upvotes: 2

Related Questions