Exemple #1
0
 private void AddViewObservers()
 {
     _observer      = new KVOObserver();
     _kvoController = FBKVOController.ControllerWithObserver(_observer);
     _kvoController.Observe(View, "frame", NSKeyValueObservingOptions.OldNew, CallbackFromKVO);
     _kvoController.Observe(View.Layer, "bounds", NSKeyValueObservingOptions.OldNew, CallbackFromKVO);
 }
Exemple #2
0
        private void RemoveViewObservers()
        {
            if (_kvoController != null)
            {
                _kvoController.UnobserveAll();
                _kvoController.Dispose();
                _kvoController = null;
            }

            if (_observer != null)
            {
                _observer.Dispose();
                _observer = null;
            }
        }