Search code examples
iosobjective-cuiviewcontrolleruinavigationcontrollermfmailcomposeviewcontroller

dismissViewControllerAnimated breaks GUI


In my app i send a mail using MFMailComposeViewController. This viewController is pushed with

 [self presentViewController:mailer animated:false completion:nil]; 

from an viewController that is on top of a uiNavigationController. When you're done mailing i remove the mfmailcomposeviewcontroller with

[self dismissViewControllerAnimated:NO completion:NULL];

The problem than is that my uinavigationController's view doesn't fill the whole screen and all the elements presented on the screen that are not part of this uinavigationcontroller become inactive. I have no Idea how to even begin to fix this so any hint would be very much appreciated.


Solution

  • I found that the dismissViewController changes the size of the calling view. Having a transparent background on this view I didn't realize that... I could easily fix this problem by simply rescaling the view of the navigationcontroller again. I hope this answer will help anybody who has the same problem.