I have a MainWindowController that I want to close on "touch inside" button event and open a new UIView. The code that I use is this:
NewViewController *controller = [[NewViewController alloc]
initWithNibName:@"NewView" bundle:nil];
controller.delegate = self;
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:controller animated:YES];
[controller release];
But in this way the MainWindowController don't close it self.
Try this one
[self dismissViewControllerAnimated:YES completion:nil];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With