I am using xcode 6. I have a Cancel button in my storyboard, when I click on it, I want to reject my view controller and return to where I come from. Therefore, in my storyboard, I connect the cancel button to my view controller using "Touch up" for my handleCancel method.
When I touch the button, I see that "handleCancel" is being called. I see the debug printfs that I put. But it does not reject my current controller.
@IBAction func handleCancel(sender: AnyObject) { println("Calling handle Cancel") self.dismissViewControllerAnimated(false, completion: nil) }
Could you tell me what else I am missing?
Thanks.
source share