RESideMenu을 사용하고 메일을 보내려는 경우 iOS8.1에서 버그를 발견했습니다.MFMailComposeInternalViewController에서 어설 션 오류가 발생했습니다. 프레젠테이션이 지연되어야합니다.
보일러 플레이트 MFMailComposer 코드 (일반 프로젝트에서는 잘 작동 함)를 사용하고 있지만 RESIDEMenu 아래에서 호출하면 중단되는 것으로 보입니다.
ObjC 및 Swift에서 iPhone6 및 iPhone5의 경우 아래에서 (완벽하게 작동하는 ResideMenu를 사용하여) 코드를 변경해 보았습니다. 변경되지 않았습니다.
var mc: MFMailComposeViewController!
func shareTest()
{
if MFMailComposeViewController.canSendMail()
{
mc = MFMailComposeViewController()
mc.setSubject("subject")
mc.setToRecipients(["[email protected]"])
mc.setMessageBody("...", isHTML: false)
mc.mailComposeDelegate = self
self.presentViewController(mc, animated: true, completion: nil)
}
}
func mailComposeController(controller: MFMailComposeViewController!, didFinishWithResult result: MFMailComposeResult, error: NSError!) {
self.dismissViewControllerAnimated(true, completion: nil)
}
어설 텍스트는 다음과 같습니다
***에서 어설 션 실패 - [MFMailComposeInternalViewController _endDelayingCompositionPresentation, /SourceCache/MessageUI/MessageUI-1466.1.2/Mail/MFMailComposeInternalViewController.m:322
*** 캐치되지 않은 예외 'NSInternalInconsistencyException'으로 인해 앱 종료 중, 이유 : '프레젠테이션이 지연되었습니다.'
dispatch_after ~ 5 ~ 10 초 내에 presentViewController를 호출하면 문제가 해결되지 않습니다. Netiher는 현재보기 대신 루트보기 컨트롤러에서 호출합니다.
또한 Google에서 '지연된 프레젠테이션을 가져 왔습니다.'라는 검색 결과가 없습니다.