Skip to content

> _if (@available(iOS 13.0,_)) { #231

Open
@lanligang

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions