I am working on an app where I will need to figure out if a user moved to a new viewcontoller, this would include if a new view controller is presented or when you come back to an earlier view controller, I have tried implementing this with a UIViewController category and intercepting user navigating to a page by overriding "viewDidAppear", but I don't want to use a category to do this as there is a high impact on every view controller, is there any way I would be able to do this?
Example: So we are working on sharing ur app screen to a customer service rep, a rep has his own rules for example there are 2 pages in an application, when customer is sharing his app screen and is on page 1, I will check the rules and figure out whether the rep should see the page and when customer navigates to page 2 and rep doesn't have permission to view this, I will pause the screen sharing because I realized page 2 is not in rep's permissions and now when I go back to page 1, I will need to check permissions again and show the page to rep(essentially resuming the screen sharing)