FBKVOController+Extension.m 666 B

1234567891011121314151617181920212223
  1. //
  2. // FBKVOController+Extension.m
  3. // homy
  4. //
  5. // Created by 翟玉磊 on 2018/11/9.
  6. // Copyright © 2018 翟玉磊. All rights reserved.
  7. //
  8. #import "FBKVOController+Extension.h"
  9. @implementation FBKVOController (Extension)
  10. - (void)fb_observe:(id)object keyPath:(NSString *)keyPath block:(FBKVONotificationBlock)block
  11. {
  12. [self observe:object keyPath:keyPath options:NSKeyValueObservingOptionInitial|NSKeyValueObservingOptionNew block:block];
  13. }
  14. - (void)fb_observe:(id)object keyPath:(NSString *)keyPath action:(SEL)action
  15. {
  16. [self observe:object keyPath:keyPath options:NSKeyValueObservingOptionInitial|NSKeyValueObservingOptionNew action:action];
  17. }
  18. @end