I noticed some slight graphical crashes when testing one of my applications under iOS 8: some UIViews elements are not in the right place, others are not the right size.
In the first step, I use storyboard, auto-layout, and restrictions. Then I programmatically adjust the limits to fit the device screen size perfectly using updateViewConstraints .
Ideal for iOS 7, but with some glitches on iOS8, as in the following figure:. / Users / dominiquevial / Documents / Informatique / Dev / Novae Marathon / _log / capture / iOS8 - iPhone 6 / pause.png
After researching, I found a problem: updateViewConstraints not being called. I do not understand why, perhaps due to some optimizations ...
Fixing this problem is easy:
- use
viewWillLayoutSubviews instead of updateViewConstraints - or add a call to
setNeedsUpdateConstraints in viewWillAppear
Which is the best way?
source share