When a button is pressed I want to segue between two view controllers by using a Modal Transition style CoverVertical
and then dismiss it. There is allot of info out there for how to do it in objective C but can't find any good info in Swift. So far I've done this but I don't think it's correct:
@IBAction func insertStatus(sender: UIButton) {
var StatusVC: StatusViewController = StatusViewController()
var modalStyle: UIModalTransitionStyle = UIModalTransitionStyle.CoverVertical
StatusVC.modalTransitionStyle = modalStyle
self.presentViewController(StatusVC, animated: true, completion: nil)
}
The Dismiss I am using like so does not work either:
@IBAction func statusSaved(sender: UIBarButtonItem) {
self.dismissViewControllerAnimated(false, completion: { () -> Void in
let usersVC: UsersViewController = self.storyboard?.instantiateViewControllerWithIdentifier("UsersViewController") as UsersViewController
})
}