iPhone16ProMax
通过[UIScreen mainScreen].bounds.size获取屏幕宽高
使用XCode15获取屏幕宽高为430 * 930
使用XCode16获取屏幕宽高为440 * 956
这是为什么?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Device: iPhone 16 Pro Max
System Version: 18.3.1
Screen width and height obtained using [UIScreen mainScreen].bounds.size are as follows
Why are the two results different?
代码如下
(void)viewDidLoad {
[super viewDidLoad];
self.navigationController.navigationBar.translucent = NO;
}
(void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:true];
}
此时加载VC时顶部会出现空白,整个VC的frame的Y值向下偏移了状态栏的高度,再次切换到此VC则会恢复,这是iOS18Bate的bug吗