Created
January 9, 2018 15:12
Revisions
-
matteodanelli created this gist
Jan 9, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ fileprivate extension Selector { static let buttonTapped = #selector(ViewController.buttonTapped) static let deviceOrientationDidChange = #selector(ViewController.deviceOrientationDidChange) } // Example on how to use it NotificationCenter.default.addObserver(self, selector: .deviceOrientationDidChange, name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil)