Created
May 18, 2022 14:38
-
-
Save erdemildiz/845caa559188df9472e8f3b0ba7ae36b to your computer and use it in GitHub Desktop.
SwiftUI check has modal on modal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIApplication { | |
var currentKeyWindow: UIWindow? { | |
UIApplication.shared.connectedScenes | |
.filter { $0.activationState == .foregroundActive } | |
.map { $0 as? UIWindowScene } | |
.compactMap { $0 } | |
.first?.windows | |
.filter { $0.isKeyWindow } | |
.first | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check If have modal on modal