title: How to get notified if the view hierarchy changed in an iOS App
body: <p>Is it possible to detect if something has changed in the view hierarchy without caching and comparing the whole view-hierarchy again and again ? Is there a global notification or something similar, that indicates that a view was removed or added to the current hierarchy?</p>
  
  <p>Currently we are using a Timer that triggers a method which is responsible for detecting a specific UI-Element on screen. But this is way to expensive. </p>
  
  <p>I know that there is method called willMoveToSuperView and that i could overwrite this in my UIView baseClass to trigger a event or something like this. However, i think this is not an elegant way of solving the Problem because it requires a lot of Refactoring for a "simple" task like this. </p>
  
  <p>So my final Question is:
  Is there an performant way of detecting changes in the view hierarchy ?</p>