For analytics purposes, I would like to detect whenever the top UIViewController is modified. I don't want to use inheritance, but rather delegate some event that I can use. I see that Firebase have some type of mechanism for that but I couldn't figure how exactly. Something like the following will be great:
NotificationCenter.default.addObserver(self, selector: #selector(topViewModified), name: .TopViewModified, object: nil)
Thanks.