@
iyeatse In iOS 10, UIKit has updated and unified background management for UINavigationBar, UITabBar, and UIToolbar. In particular, changes to background properties of these views (such as background or shadow images, or setting the bar style) may kick off a layout pass for the bar to resolve the new background appearance.
In particular, this means that attempts to change the background appearance of these bars inside of -[UIView layoutSubviews], -[UIView updateConstraints], -[UIViewController willLayoutSubviews], -[UIViewController didLayoutSubviews], - [UIViewController updateViewConstraints], or any other method that is called in response to layout may result in a layout loop.
In some cases you can break these layout loops by ensuring that you always use the same object instance when objects (such as UIImage or UIColor) are required. But in general you should avoid doing this.
Because all appearance parameters are now resolved at one time, there may be some cases where your bar's appearance has changed. In general, best results are obtained by specifying as little as possible for customizing your bar. For example, if you are specifying a barTintColor value and specifying an empty UIImage object for the backgroundImage property (as is the case when you call [UIImage new], for example) then you should get better results by specifying only the barTintColor. Any changes you make to resolve these issues in iOS 10 should also work correctly in iOS 9 — if this is not the case, please report bugs with a sample project and a screenshot indicating what the bars should look like.
这是刚出的 beta 3 的 release note 。似乎换了架构,没准这个问题有机会彻底解决。