I am trying to open an email view controller ( MFMailComposeViewController ) and all I read suggests using presentModalViewController:animated: which seems to need to be sent to a UIViewController .
For example, the documentation says:
Call the presentModalViewController:animated: method of the current view controller, passing it to the view controller that you want to present using the method.
But I don’t have a “current view controller”! My application is otherwise completely OpenGL, and my installation code looks like this:
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.view = [[IPhoneView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; [window addSubview: self.view]; [window makeKeyAndVisible];
and I set the OpenGL context in the IPhoneView class.
I found a few questions to find out how to get the UIViewController from UIView , and there seems to be consensus: t. So, how can I open the email view controller with this awesome moving animation?
source share