willTransitionToTraitCollection not get called, why?

こ雲淡風輕ζ 提交于 2019-12-22 04:05:22

问题


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.



来源:https://stackoverflow.com/questions/25634085/willtransitiontotraitcollection-not-get-called-why

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!