In iOS, is there a listening function that will enable an app detect when there is a banner (from any other application like whatsapp/snapchat/iMessage banners) on the screen/UI? For example, to detect brightness change I have something like this:
NotificationCenter.default.addObserver(
self,
selector: #selector(self.levelChanged),
name: .UIScreenBrightnessDidChange,
object: nil)
I also found this post, which is similar but I want my app to just know (on a binary level) if there is a banner or not, I do not need to know the content or source app of the banner.