Present View Controller和现有View Controller状态栏仅在某些设备(如ios 8)中重叠

问题描述 投票:0回答:1

[Present View Controller和现有View Controller]状态栏仅在ios 8 Status Bar image之类的某些设备中重叠,当重定向到另一个View Controller时,现有视图屏幕状态栏会部分显示。我正在使用此代码重定向

SecondView *view = [[SecondView alloc] initWithNibName:nil bundle:nil];

[self presentViewController:view animated:YES completion:NULL];
ios objective-c iphone uiview viewcontroller
1个回答
0
投票

这不是状态栏的错误,这是iOS 13的功能。如果您不希望这样做,可以将modalPresentationStyle设置为全屏。喜欢,

SecondView *view = [[SecondView alloc] initWithNibName:nil bundle:nil];
view.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:view animated:YES completion:NULL];
© www.soinside.com 2019 - 2024. All rights reserved.