标签:shared rmi 方式 window hang uiwindow this ffffff long
突然的崩溃让我措手不及
*** Terminating app due to uncaught exception ‘NSInternalInconsistencyException‘, reason: ‘App called -statusBar or -statusBarWindow on UIApplication: this code must be changed as there‘s no longer a status bar or status bar window. Use the statusBarManager object on the window scene instead.‘
修改方式
if (@available(iOS 13.0, *)) {
if (!_statusBar) {
// iOS 13 弃用keyWindow属性 从所有windowl数组中取
UIWindow *keyWindow = [UIApplication sharedApplication].windows[0];
_statusBar = [[UIView alloc] initWithFrame:keyWindow.windowScene.statusBarManager.statusBarFrame];
[keyWindow addSubview:_statusBar];
}
}
标签:shared rmi 方式 window hang uiwindow this ffffff long
原文地址:https://www.cnblogs.com/yangqinoak/p/11896798.html