1

I am using adaptive layout with size classes (iOS10). For an iPad I want to support portrait & landscape views, but for iPhone I only want to support portrait. I don't want to rotate screen for compact height.

iPad is all fine and I have set-up the iPhone views using size classes, so I am thinking I need to somehow detect what size class will be transitioned to and disable rotation if it would go to compact height.

I can see a method called traitCollectionDidChange, but not sure if this is the correct time in the lifecycle to detect this.

There are a few related questions, but I don't see anything that covers this specific scenario.

MikeJ
  • 2,367
  • 3
  • 18
  • 23

0 Answers0