RSDAppOrientationLock
public protocol RSDAppOrientationLock : UIApplicationDelegate
As of this writing, there is no simple way for an application to allow selectively locking
the orientation of the app to portrait, while still allowing some view controllers to
require landscape. This is intended as a work-around for that limitation. Using this feature
requires the view controller that needs to change the orientation to set the
orientationLock in viewWillAppear and then clear the lock on viewDidAppear.
syoung 08/15/2019
Seealso
RSDAppDelegate for an example implementation.
-
The default orientation lock if not overridden by setting the
orientationLockproperty.Declaration
Swift
var defaultOrientationLock: UIInterfaceOrientationMask { get } -
The
orientationLockproperty is used to override the default allowed orientations.Seealso
defaultOrientationLockDeclaration
Swift
var orientationLock: UIInterfaceOrientationMask? { get set }
-
appLockExtension methodConvenience accessor for the appLock for applications where the app delegate implements this protocol.
Declaration
Swift
public static var appLock: RSDAppOrientationLock? { get }
View on GitHub
RSDAppOrientationLock Protocol Reference