Reputation: 2298
From the storyboard, I set constraints:
1) Leading space to: Superview = 0
2) Trailing space to: Superview = 0
When today extension loads, there is this little margin offset in the beginning, then disappears after done showing the view.
Then after view-did-appear:
I tried setting "Leading space to: Superview" and "Trailing space to: Superview" to -8, -16.0 etc. But nothing worked. The offset margin showing up in the beginning still shows up to a different value as I changed the constraint value.
How can I prevent this re-adjustment from happening?
Upvotes: 0
Views: 107
Reputation: 491
If you don't already do so, try adjusting your views in viewWillAppear
. This should make sure that once the elements become visible on screen, they are already laid out correctly. I had a similar issue and this fixed it for me.
Upvotes: 1