Created
January 21, 2016 18:56
-
-
Save nbhasin2/0e8af7212f5c596efc8a to your computer and use it in GitHub Desktop.
Orientation.swift
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 characters
| override func didRotateFromInterfaceOrientation(fromInterfaceOrientation: UIInterfaceOrientation) { | |
| var text="" | |
| switch UIDevice.currentDevice().orientation{ | |
| case .Portrait: | |
| self.delegate?.reloadButtons!() | |
| case .PortraitUpsideDown: | |
| text="PortraitUpsideDown" | |
| case .LandscapeLeft: | |
| text="LandscapeLeft" | |
| case .LandscapeRight: | |
| text="LandscapeRight" | |
| default: | |
| text="Another" | |
| } | |
| NSLog("You have moved: \(text)") | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment