I have two windows. One is completely in background and another one is in foreground. How to disable interactions for only background view and not for the foreground view using swift?
Ideally I'm calling the method beginIgnoringInteractions() from background window.
I tried override the UIApplication like below:
extension UIApplication {
override func beginIgnoringEvents() {
if forgroundWindowIsPresent {
} else {
super.beginIgnoringEvents()
}
}
}