Dismiss not working


I can’t seem to figure out why the dismiss code isn’t working. I’m using Xcode 6

- (IBAction)dismiss:(id)sender { NSLog(@"hello"); [self.presentingViewController dismissViewControllerAnimated:YES completion:nil]; }

the method gets called whenever the done button is pressed, however dismissViewControllerAnimated doesn’t get execute.

Any help would be greatly appreciated!


Found my error, I didn’t segue modally to the navigation controller.