WillTransitionToTraitCollection will not be called, why?

I am trying to replace didRotateFromInterfaceOrientation with willTransitionToTraitCollection - in a subclass of UIViewController - as doc says, but the method is not called when I rotate the device. Why?

+6
source share
1 answer

If you test this on an iPad, it has regular feature collections for the vertical and horizontal classes for both orientations, so it will not call this method when the orientation is changed.

+16
source

Source: https://habr.com/ru/post/974722/


All Articles