Your code looks correct, and as stated the error message strongly suggests this has something to do with UIView
proper (not MFMail
specifically). The problem almost surely lies somewhere elsewhere within your code, and might be challenging to troubleshoot.
Some things to look for:
- Other animations or view controller transitions/dismissals happening simultaneously or incorrectly (possibly like this)
- Release/retain issues, of course
If none of that seems like the fix, try commenting-out everything else happening in the view controller that calls this method and see if it works then.
If you still can't get it working, present the simplest version you can of failing code so we can troubleshoot further. :)