ReactiveCocoa / ReactiveObjC

The 2.x ReactiveCocoa Objective-C API: Streams of values over time
MIT License
2.6k stars 496 forks source link

I installed ReactiveObjC by cocopods ,I import it like "#import <ReactiveObjC/ReactiveObjC.h>" ,but when I use it ,an error occured like"No visible @interface for 'aviewController' declares the selector 'rac_observeKeyPath:options:observer:block:'" #145

Open Goallying opened 6 years ago

Goallying commented 6 years ago

I installed ReactiveObjC by cocopods ,I import it like "#import <ReactiveObjC/ReactiveObjC.h>" ,but when I use it ,an error occured like"No visible @interface for 'aviewController' declares the selector 'rac_observeKeyPath:options:observer:block:'" whatis wrong? and thank you very much!!!

faimin commented 6 years ago

The ReactiveCocoa.h file don't include NSObject+RACKVOWrapper.h which rac_observeKeyPath:options:observer:block: in. so if you want to use the rac_observeKeyPath:options:observer:block: method, you should import NSObject+RACKVOWrapper.h manually.