gpt4 book ai didi

iphone - 使 UIView 全屏显示的问题

转载 作者:行者123 更新时间:2023-11-29 13:35:18 24 4
gpt4 key购买 nike

我正在尝试制作一个 UIView 全屏,但问题是我的 View 没有覆盖所有屏幕这是我的代码:

    PDFView.frame = [[UIScreen mainScreen] applicationFrame];
PDFView.frame = self.view.bounds;
[PDFView setNeedsLayout];

enter image description here

我的应用仅在纵向模式下运行。

最佳答案

不覆盖整个屏幕是否意味着导航栏和/或标签栏仍然存在?如果是这样,请检查以确保您已在 View Controller viewDidLoad 中完成这些操作。

[[UIApplication sharedApplication] setStatusBarHidden:YES];    
[self.navigationController setNavigationBarHidden:YES]
[self.tabBarController.tabBar.hidden = YES]

这些应该会处理任何会阻止您的全屏显示的事情。

关于iphone - 使 UIView 全屏显示的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10724729/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com