I am using xcode 6. I have a 'Cancel' button in my storyboard, when I click it, I want to dismiss my view controller and go back to where I come from. So in my storyboard, I wire the cancel button to my View Controller with 'Touch up' to my 'handleCancel' method.
When I touch the button, I see 'handleCancel' is being called. I see the debug printfs I put it. But it does not dismiss my current view controller.
@IBAction func handleCancel(sender: AnyObject) {
println("Calling handle Cancel")
self.dismissViewControllerAnimated(false, completion: nil)
}
Can you please tell me what else I am missing?
Thank you.