BWSnippet

Swift detect device rotation notification

Swift detect device rotation notification

iOS detect device rotation in swift via notification

NotificationCenter.default.addObserver( self, selector: #selector(controller.rotated), name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil)

Tags

Swift detect device rotation notification