public static void AddObserver(this NSObject self, NSObject observer, string keypath)
 {
     self.AddObserver(observer, (NSString)keypath, NSKeyValueObservingOptions.New, IntPtr.Zero);
 }
Exemplo n.º 2
0
 public static IObservable <NSObservedChange> ObserveKey(this NSObject obj, string key) =>
 Observable.Create <NSObservedChange>(obs => obj.AddObserver(key, NSKeyValueObservingOptions.New, obs.OnNext));
Exemplo n.º 3
0
 public static void AddObserver(this NSObject obj, string key, Action action)
 {
     obj.AddObserver(helper, (NSString)key, NSKeyValueObservingOptions.New, IntPtr.Zero);
     helper.Add(obj, key, action);
 }