一個用戶報告我得應(yīng)用程序在點擊電子郵件按鈕后立即崩潰.但是我無法在同一規(guī)格得設(shè)備上重現(xiàn)問題.
附加崩潰日志.我調(diào)用[self presentModalViewController:controller animated:YES];在我得報告VC.m.控制器是MFMailComposeViewController得一個實例.
Incident Identifier: 4A06DE9B-178C-43C2-AE23-D8C7EEED7831CrashReporter Key: 8b802dcda2f9dfd70003b0bedceac04ef79730f0Hardware Model: iPad3,6Process: ATracker [5610]Path: /var/mobile/Applications/ACABBAE7-C701-48AD-9DAC-9B4C0ABD3CFF/ATracker.app/ATrackerIdentifier: ATrackerVersion: ??? (???)Code Type: ARM (Native)Parent Process: launchd [1]Date/Time: 2013-07-15 18:42:30.776 +0100OS Version: iOS 6.1.3 (10B329)Report Version: 104Exception Type: EXC_CRASH (SIGABRT)Exception Codes: 0x0000000000000000,0x0000000000000000Crashed Thread: 0Last Exception Backtrace:0 CoreFoundation 0x3286c3e2 __exceptionPreprocess + 1581 libobjc.A.dylib 0x3a70695e objc_exception_throw + 262 UIKit 0x34767118 -[UIViewController presentViewController:withTransition:completion:] + 37643 UIKit 0x34888d9e -[UIViewController presentModalViewController:animated:] + 264 ATracker 0x0007fac2 -[ReportVC sendEmail:] (ReportVC.m:1936)5 UIKit 0x34766082 -[UIApplication sendAction:to:from:forEvent:] + 666 UIKit 0x34766036 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 267 UIKit 0x34766010 -[UIControl sendAction:to:forEvent:] + 408 UIKit 0x347658c6 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 4989 UIKit 0x34765db4 -[UIControl touchesEnded:withEvent:] + 48410 UIKit 0x3468e5f4 -[UIWindow _sendTouchesForEvent:] + 52011 UIKit 0x3467b8dc -[UIApplication sendEvent:] + 37612 UIKit 0x3467b1ea _UIApplicationHandleEvent + 619413 GraphicsServices 0x3636f5f2 _PurpleEventCallback + 58614 GraphicsServices 0x3636f222 PurpleEventCallback + 3015 CoreFoundation 0x328413e2 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 3016 CoreFoundation 0x32841386 __CFRunLoopDoSource1 + 13417 CoreFoundation 0x3284020a __CFRunLoopRun + 137818 CoreFoundation 0x327b3238 CFRunLoopRunSpecific + 35219 CoreFoundation 0x327b30c4 CFRunLoopRunInMode + 10020 GraphicsServices 0x3636e336 GSEventRunModal + 7021 UIKit 0x346cf2b4 UIApplicationMain + 111622 ATracker 0x00044fe6 main (main.m:16)23 ATracker 0x00044f9c start + 36
任何想法或提示表示贊賞!
解決方法
應(yīng)檢測設(shè)備canSendMail
[MFMailComposeViewController canSendMail]
如果設(shè)備上沒有郵件帳戶,則返回false.
@see https://stackoverflow.com/a/3671759/946434
以上是來客網(wǎng)為你收集整理得ios – 使用MFMailComposeViewController打開presentModalViewController時崩潰全部內(nèi)容,希望內(nèi)容能夠幫你解決ios – 使用MFMailComposeViewController打開presentModalViewController時崩潰所遇到得程序開發(fā)問題。
如果覺得來客網(wǎng)網(wǎng)站內(nèi)容還不錯,歡迎將來客網(wǎng)網(wǎng)站推薦給程序員好友。
聲明:所有內(nèi)容來自互聯(lián)網(wǎng)搜索結(jié)果,不保證100%準確性,僅供參考。如若本站內(nèi)容侵犯了原著者的合法權(quán)益,可聯(lián)系我們進行處理。