I've been trying to present and dismiss a view controller programmatically and I keep running into EXC issues.
What is the proper way to present and dismiss a view controller other than using:
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("Popup") as UIViewController
self.presentViewController(vc, animated: true, completion: nil)
and self.dismissViewControllerAnimated(true, completion: nil)
?
So far the app crashes when i run the function: dismissViewControllerAnimated
Please help, thanks!