Skip to content

Instantly share code, notes, and snippets.

@thomasgruebler
Created June 14, 2015 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasgruebler/60c9603c0a5329c03b13 to your computer and use it in GitHub Desktop.
Save thomasgruebler/60c9603c0a5329c03b13 to your computer and use it in GitHub Desktop.
Create Storyboard "dismiss" Segue
/* 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