I\'m manually invoking a segue (set as modal) in order to display a login form in Xcode 4.2 using Storyboards with the following line of code:
[self performSegue
If your deployment target is iOS 5.0 or later, use this message:
[self dismissViewControllerAnimated:YES completion:nil];
Or in Swift:
self.dismissViewControllerAnimated(true, completion: nil)
If your deployment target is older, use this (deprecated) message:
[self dismissModalViewControllerAnimated:YES];