My app has a UITabBarController. One of the tabs is to enable a user to send
an email to my clients. I created a UIViewController for that tab bar item,
and in its ViewDidLoad I have code that uses Reachability to determine if an
internet connection is there, and if
MFMailComposeViewController.CanSendMail, I invoke a MailComposeDelegate so
the user can compose and send an email. This all works just fine. But I have
two problems.

First, if I cancel the email composition, and the compose email modal view
goes away, the view is blank, and navigating away from this screen and back
to it doesn't "reset" anything (not that I expected it to). So I need to
figure out how to "rest" that mail functionality in the
MFMailComposeResult.Cancelled block of code (right now it just disposes of
the modal view controller in an animated fashion).

Second, when I do send an email, I get a "Mail Alert: Mail Sent" alert as
expected, but it stays on the screen and effectively locks the app until I
force close it and launch it again. So obviously I'm missing a step in there
somewhere. Presumably something I need to add to the
MFMailComposeResult.Sent block of code. Maybe I need to set how many seconds
the "Mail Sent" alert stays on the screen, or something like that? 

I couldn't find code examples online to help with this, but maybe I'm not
looking for the right things. Anyway, any suggestions? 


--Chris


 



--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/Fun-with-MFMailComposeViewController-tp4657247.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to