Skip to content

Instantly share code, notes, and snippets.

@olxios
Created June 20, 2016 19:00
Show Gist options
  • Save olxios/1158e778f07d888d68335238e10ad72b to your computer and use it in GitHub Desktop.
Save olxios/1158e778f07d888d68335238e10ad72b to your computer and use it in GitHub Desktop.
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