Whenever you want to do something to respond to a user spinning their device, you must use viewWillTransitionToSize , if you do, you know for sure that your actions are executed, as it is called every time your application window changes its size .
If you want to act only when changing the collection of tags, for example, if you have a specific collectionViewLayout for a class of size Compact , and another that you want to use for Regular , you will willTransitionToTraitCollection .
If the collection of tags changes, the size also changes. But this does not work the other way around. Portrait iPad and landscape iPad have the same features, but different sizes. Add multitasking to the mix, and you have a number of sizes that will be displayed for only two traitCollection size traitCollection .
donnywals
source share