UIDocumentInteractionController 的presentPreviewAnimated 之后 setStatusBarHidden 停止正常工作
所以我的应用程序在 AppDelegate 中将状态栏设置为隐藏,如下所示。它按预期工作。
[[UIApplication sharedApplication] setStatusBarHidden:YES];
然后我像这样使用 UIDocumentInteractionController 的 PresentPreviewAnimated 等:
[self.docInteractionController presentPreviewAnimated:YES];
我观察到,在此 UIDoc 的预览模式下,状态栏确实显示(带有电池信息等)。但是在关闭预览并返回到原始视图后,虽然状态栏不存在,但有一个黑条。大小与状态栏相同。
有没有人遇到过这种行为以及对此有什么补救措施?
So my app has the status bar set to be hidden like this in the AppDelegate. And it works as intended.
[[UIApplication sharedApplication] setStatusBarHidden:YES];
Then I use UIDocumentInteractionController's presentPreviewAnimated like this,etc.:
[self.docInteractionController presentPreviewAnimated:YES];
I observed that the status bar does show up (with battery info etc.) while in this UIDoc's preview mode. But after dismissing the preview and back to the original view, while the status bar is not there but there is a black bar instead. The size is same as the status bar.
Has anyone encountered this behavior and any remedy for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我面临着同样的问题。找到了此问题的快速修复...将视图的框架设置回 viewWillAppear...我的代码看起来像这样...
希望它有帮助! :)
I am facing the same issue. Found a quick fix to this issue...set the view's frame back inside viewWillAppear... My code looks something like this...
Hope it helps! :)