status bar and Navigation bar problem after dismissed modal view

主宰稳场 提交于 2019-12-10 17:41:26

问题


the apps launched the mailcomposer modal view (MFMailComposeViewController) when the Contact Us button is pressed. but once the modal view is loaded, the status bar is hidden automatically.

I setStatusBarHidden Status to NO after modal view controller is dismissed.

[self dismissModalViewControllerAnimated:YES];
[[UIApplication sharedApplication] setStatusBarHidden:NO];

but the status bar and navigation bar is overlapped after ModalViewController is dismissed.

I got no clue how to fix it. Appreciate any kind help. Thanks.


回答1:


my problem is solved by launching the MFMailComposeViewController from appDelegate tabBarController

 myAppDelegate *mDelegate = (myAppDelegate *)[[UIApplication sharedApplication] delegate];
[mDelegate.tabBarController presentModalViewController:picker animated:YES];

instead of launching from the navigation Controller

[self presentModalViewController:picker animated:YES];


来源:https://stackoverflow.com/questions/3756943/status-bar-and-navigation-bar-problem-after-dismissed-modal-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!