I am inside a tableViewController that has been pushed into view. This tableViewController has cells with accessoryButtons. When one of these buttons is tapped I would like to push a MFMailComposeViewController. Then I do this
MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
controller.mailComposeDelegate = self;
// ... here controller is configured...
// t开发者_如何学编程hen I would like to do
[self.navigationController pushViewController:controller animated:YES];
But as MFMailComposeViewController
despite its incorrect name is a NavigationController
itself, how can I push its viewController
using pushViewController
? I mean, what is the correct way to do that?
thanks.
You should use presentModalViewController:animated:
instead.
精彩评论