ScreenOrientationManager
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
- iOS 10.0+
- Swift 3.2+
Installation
ScreenOrientationManager is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'ScreenOrientationManager'
Setup
Add ScreenOrientationManager to listen any screen orientation change. Add this extension on your project or directly add the method on AppDelegate class.
extension AppDelegate {
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
return ScreenOrientationManager.singleton.orientation
}
}
Author
Josue Meza Peña, [email protected]
License
ScreenOrientationManager is available under the MIT license. See the LICENSE file for more info.