I am trying to replace didRotateFromInterfaceOrientation
with willTransitionToTraitCollection
- in a UIViewController subclass - as doc says, but method is not get called when I am rotating device. Why?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
If you're testing this on iPad it has regular trait collections for vertical and horizontal class for both orientations, thus it will not call this method when orientation changed.