Open henrikac opened 12 months ago
I wonder how realistic it it would be to replace it with the recommended way of accessing a scene instance to get the screen:
let screen = UIApplication.shared.connectedScenes.first(
where: { $0 is UIWindowScene }
) as? UIWindowScene
Because it's optional, I don't know of a clean replacement that is guaranteed to always return some screen object like what UIScreen.main
does.
I can see in the source code that this package is using
UIScreen.main
a lot. However, this was deprecated in iOS 16.https://developer.apple.com/documentation/uikit/uiscreen/1617815-main