iphone - 关闭模态视图后状态栏和导航栏问题

标签 iphone uinavigationcontroller statusbar modalviewcontroller overlapping

当按下“联系我们”按钮时,应用程序启动了邮件撰写器模态视图 (MFMailComposeViewController)。 但是一旦加载模态视图,状态栏就会自动隐藏。

在模态视图 Controller 关闭后,我将StatusBarHidden Status设置为NO。

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

但是 ModalViewController 关闭后状态栏和导航栏重叠。

我不知道如何解决它。 感谢任何善意的帮助。 谢谢。

最佳答案

通过从 appDelegate tabBarController 启动 MFMailComposeViewController 解决了我的问题

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

而不是从导航 Controller 启动

[self presentModalViewController:picker animated:YES];

关于iphone - 关闭模态视图后状态栏和导航栏问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3756943/

相关文章:

iphone - UITableView 被拖动时,performSelector 无法运行?

iphone - 如何释放返回的对象?

iphone - 将 MKMapView 上的距离转换为 UIView 的距离

swift - 在 MFMailComposeViewController 中设置导航栏项目颜色

objective-c - 如何在开始时检测 iPad 的 interfaceRotation?

iphone - NSFetchedResultsController : Fill TableView with fetched entity and its related entity

swift - 如何在主屏幕之前设置首次登录 View Controller

iphone - 嵌套的 UINavigationControllers

ios - 在状态栏上方添加 subview iOS 7

javascript - 如果在 html 中启用了 javascript,则无法获取 Controller 模型属性