我有一個UIViewController作爲彈出窗口顯示在我的iPad應用程序中。在它內部,我有一個觸發MFMailComposeViewController發送郵件的按鈕。但是,它目前似乎沒有做任何事情,即使如果我使該視圖控制器不是彈出窗口,它可以正常工作。我的猜測是,這是因爲我試圖從另一個模式屏幕觸發一個模式屏幕,所以我的問題是:有沒有辦法做到這一點?這裏可以接受的互動是什麼?從彈出的MFMailComposeViewController
如果我嘗試關閉我的模式彈出窗口,然後顯示MFMailComposeViewController,它會關閉彈出窗口並且什麼都不會發生。我嘗試將MFMailComposeViewController的頂部視圖控制器,因爲它是一個UINavigationController,將其拖到彈出窗口的導航控制器上,並且我將導航欄更新爲正確的東西,但沒有控件。它也崩潰時,我點擊取消:
-[NSPathStore2 _closeButtonClicked:]: unrecognized selector sent to instance 0xc602f70
(gdb) bt
0 0x020fa2f9 in objc_exception_throw()
1 0x01fa80bb in -[NSObject(NSObject) doesNotRecognizeSelector:]()
2 0x01f17966 in ___forwarding___()
3 0x01f17522 in __forwarding_prep_0___()
4 0x008994fd in -[UIApplication sendAction:to:from:forEvent:]()
5 0x00aabcc3 in -[UIBarButtonItem(UIInternal) _sendAction:withEvent:]()
6 0x008994fd in -[UIApplication sendAction:to:from:forEvent:]()
7 0x00929799 in -[UIControl sendAction:to:forEvent:]()
8 0x0092bc2b in -[UIControl(Internal) _sendActionsForEvents:withEvent:]()
9 0x0092a7d8 in -[UIControl touchesEnded:withEvent:]()
10 0x008bdded in -[UIWindow _sendTouchesForEvent:]()
11 0x0089ec37 in -[UIApplication sendEvent:]()
12 0x008a3f2e in _UIApplicationHandleEvent()
13 0x02597992 in PurpleEventCallback()
14 0x01f87944 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__()
15 0x01ee7cf7 in __CFRunLoopDoSource1()
16 0x01ee4f83 in __CFRunLoopRun()
17 0x01ee4840 in CFRunLoopRunSpecific()
18 0x01ee4761 in CFRunLoopRunInMode()
19 0x025961c4 in GSEventRunModal()
20 0x02596289 in GSEventRun()
21 0x008a7c93 in UIApplicationMain()
22 0x00002c9e in main (argc=1, argv=0xbffff000) at /Users/abushnaq/AccurevWorkspaces/Future_Core_Integration_iphone/iPhoneClient/main.m:15
並沒有這個stacktrace是在我寫的代碼。
任何想法?