Skip to content

The notifications for an orientation change not working for iOS 9/ swift 2/ xcode 7 #47

@feliciaf

Description

@feliciaf

The notifications for an orientation change not working. I have tried to comment out:
// Set the notifications for an orientation change & BG mode
let defaultNotificationCenter = NSNotificationCenter.defaultCenter()
defaultNotificationCenter.addObserver(self, selector: #selector(SwiftPages.applicationWillEnterBackground), name: UIApplicationWillResignActiveNotification, object: nil)
defaultNotificationCenter.addObserver(self, selector: #selector(SwiftPages.orientationWillChange), name: UIApplicationWillChangeStatusBarOrientationNotification, object: nil)
defaultNotificationCenter.addObserver(self, selector: #selector(SwiftPages.orientationDidChange), name: UIDeviceOrientationDidChangeNotification, object: nil)

and it is not recognizing SwiftPages.orientationDidChange, SwiftPages.orientationWillChange & SwiftPages.applicationWillEnterBackground.

i have tried several ways but no luck. please i would really appreciate guidance or direction. I can update the code for all users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions