Created
March 15, 2018 11:22
-
-
Save billypchan/dc9f76a00a298cb5e0d6cd522f68a71b to your computer and use it in GitHub Desktop.
For printing UIInterfaceOrientation in Swift
This file contains 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 characters
extension UIInterfaceOrientation : CustomStringConvertible { | |
public var description: String { | |
switch self { | |
case .unknown: return "unknown" | |
case .portrait: return "portrait" | |
case .portraitUpsideDown: return "portraitUpsideDown" | |
case .landscapeLeft: return "landscapeLeft" | |
case .landscapeRight: return "landscapeRight" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment