Created
June 20, 2016 19:00
-
-
Save olxios/1158e778f07d888d68335238e10ad72b to your computer and use it in GitHub Desktop.
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
class SecondViewController: UIViewController { | |
var isPresented = true // This property is very important, set it to true initially | |
@IBAction | |
func dismiss() { | |
isPresented = false // Set this flag to NO before dismissing controller, so that correct orientation will be chosen for the bottom controller | |
self.presentingViewController!.dismissViewControllerAnimated(true, completion: nil); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment