4

我試圖打開電子郵件視圖控制器(MFMailComposeViewController),我讀的所有內容都使用presentModalViewController:animated:,這似乎需要發送到UIViewController如何在iPhone上呈現模態視圖控制器而不使用「當前」視圖控制器?

例如,在the documentation,它說:

調用presentModalViewController:animated:方法當前視圖控制器,傳遞你想模態呈現視圖控制器。

但我沒有「當前視圖控制器」!我的應用程序是完全否則OpenGL的,我的設置代碼:

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 
self.view = [[IPhoneView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 

[window addSubview: self.view]; 
[window makeKeyAndVisible]; 

,我設立在IPhoneView類OpenGL上下文。

我發現了一些questions問如何從UIView得到UIViewController,並且共識似乎是:不。那麼我怎樣才能打開那個漂亮的滑動動畫的電子郵件視圖控制器?

回答

相關問題