ios - MFMailComposeViewController won't appear in iOS8 -


i have objective c program has popover list of dates , 2 buttons "done" , "cancel". when user hits date , done button, popover supposed disappear , mfmailviewcontroller window populated data date supposed appear.

when run program on ipad ios 7, works fine - popover disappears , mail view appears data populated. when run on ipad ios 8.1, popover disappears mail view not appear.

using nslog output, know ipad can send email, correct date getting method, mfmailviewcontroller object exist, , gets past line supposed present controller. controller doesn't appear.

any appreciated because tons of web searches have found nothing helpful.

the end of method is:

nslog(@"about present mail view"); if ([mfmailcomposeviewcontroller cansendmail] == yes){     nslog(@"can email yes"); } else {     nslog(@"can email no"); } nslog(@"the picker %@",picker); [self presentviewcontroller:picker animated:no completion:null]; nslog(@"leaving method emaildatafiles"); 

and output code is:

about present mail view can email yes picker <mfmailcomposeviewcontroller: 0x1616ac00> leaving method emaildatafiles 

i think race condition.. dismisspopover on donebutton-action of popovercontroller , presentviewcontroller of picker clashing..

can try if below option works ?

    dispatch_after(dispatch_time(dispatch_time_now, (int64_t)(0.3 * nsec_per_sec)), dispatch_get_main_queue(), ^{         [self presentviewcontroller:picker animated:no completion:null];     }); 

Comments

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

SQL Server - MyCTE query based on 24 hour period (next day) -

php - Using str_replace to translate a MySQL Table in html -