Open
Description
if (@available(iOS 13.0,)) {
不要让代码块 引用 window 要不然会出现创建的 window 不释放
__weak UIWindow *weakWindow= window;
[[NSNotificationCenter defaultCenter]addObserverForName:UISceneWillConnectNotification object:nil queue:nil usingBlock:^(NSNotification * _Nonnull note) {
weakWindow.windowScene = note.object;
}];
}
Metadata
Assignees
Labels
No labels