Created
June 14, 2015 19:26
-
-
Save thomasgruebler/60c9603c0a5329c03b13 to your computer and use it in GitHub Desktop.
Create Storyboard "dismiss" Segue
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
/* Original from: http://jeffreysambells.com/2014/02/19/dismissing-a-modal-view-using-a-storyboard-segue | |
Now updated to swift | |
*/ | |
import UIKit | |
class DismissSegue : UIStoryboardSegue { | |
override func perform() { | |
let sourceViewController = self.sourceViewController as! UIViewController | |
sourceViewController.presentingViewController!.dismissViewControllerAnimated(true, completion: nil) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment