Detect if app is running in Slide Over or Split View mode in iOS 9

后端 未结 15 2430
死守一世寂寞
死守一世寂寞 2020-12-04 15:31

In iOS 9, is it possible to detect when an app is running in iOS 9\'s Slide Over or Split View mode?

I\'ve tried reading through Apple\'s documentation on iOS 9 mult

15条回答
  •  一整个雨季
    2020-12-04 16:16

    I wrote a SizeClasser library based on @Michael Voccola's library.
    You can initialize it with the traitCollection of your view controller and detect split views as well as device specific orientation.
    So you could write your code specifically 1/3 horizontal split view or 1/3 portrait split view which UITraitCollection does not give you a way to detect them.
    https://github.com/cemolcay/SizeClasser

提交回复
热议问题