Skip to content

josuemeza/ScreenOrientationManager

Repository files navigation

ScreenOrientationManager

CI Status Version License Platform

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, contacto@josuemeza.com

License

ScreenOrientationManager is available under the MIT license. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published