Note that there are some explanatory texts on larger screens.

plurals
  1. POdismissModalViewController Hides the parent view behind status bar
    primarykey
    data
    text
    <p>I have a very strange issue here. I am using a present modal view controller to display my MFMailComposer ViewController on top of a ViewController which is placed with in a Navigation Bar. </p> <p><code>[self presentModalViewController:emailviewController animated:YES];</code></p> <p>to hide , I use ... </p> <pre><code>-(void) mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error { [self dismissModalViewControllerAnimated:YES]; } </code></pre> <p>Everything works fine but when I dismiss my MailComposer the original view controller hides behind the status bar . </p> <p>I have tried to modify view offset by 10 using setFrame method but It din't worked . (this is tired before and after the modal view controller is presented and dismissed )</p> <p>I have tried by hiding status bar temporarily but didn't worked.</p> <p>I have tried self.navigationcontroller presentmodalviewcontrolle but that didn't worked too...</p> <p>Any ideas or suggestions would be highly appreciated </p> <p><img src="https://i.stack.imgur.com/7vOlr.png" alt="After dismissmodalviewcontroller called"></p> <p>edited : Most of the people give me a suggestion to modify the offset manually. Well that does not work . Because if I do that in my viewDidLoad/viewWillapper of the original viewcontroller method then It shifts my view before the present modal view controller whereas after I load the modal view controller It becomes normal. </p> <ul> <li>(void) viewDidAppear: (BOOL) animated { CGRect frame = self.navigationController.view.frame; frame.origin.y = 20; self.navigationController.view.frame = frame; }</li> </ul> <p><img src="https://i.stack.imgur.com/BEFI7.png" alt="Changing offset results in this"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload