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

发布于 2024-09-24 13:51:17 字数 354 浏览 2 评论 0原文

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

模态视图控制器被关闭后,我将StatusBarHidden Status 设置为NO。

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

但在 ModalViewController 关闭后,状态栏和导航栏会重叠。

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

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

神魇的王 2024-10-01 13:51:17

我的问题是通过从 appDelegate tabBarController 启动 MFMailComposeViewController

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

而不是从导航控制器启动来解决的

[self presentModalViewController:picker animated:YES];

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];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文