iOS - How to get the Window layer after iOS11

After discovering 11, the Window level cannot always be obtained. It turned out to be like this.


    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 11) {
        view = [[UIApplication sharedApplication].windows firstObject];
    } else {
        view = [[UIApplication sharedApplication].windows lastObject];
    }


Thanks for watching, thank you for applying what you have learned.

Guess you like

Origin blog.csdn.net/siwen1990/article/details/78941353