0

I would like to observe the following property…

@property (nonatomic, assign, readonly, getter = isConnected) BOOL connected;

with the following code…

RACSignal *connectedSignaler = RACObserve(communicationManager, connected);

It does not work because of the custom getter. If I remove the custom getter it works fine.

Can someone tell me why this does not work and what I can do to work around the problem?

P.S. I have also tried RACObserve(communicationManager, isConnected);

Onato
  • 9,916
  • 5
  • 46
  • 54
  • 1
    How is the property being set? `RACObserve` is just a wrapper for KVO, so you need to ensure that your updates are KVO-compliant. – Justin Spahr-Summers Feb 19 '14 at 17:20
  • Yes, as I said it works fine without the getter=. I have tried it out with KVO and the problem is there not in RACObserve. – Onato Feb 20 '14 at 09:04
  • Sorry, I misread your comment. I tracked the problem down. The isConnected getter was overridden by the class. I would have thought only overriding the setter would cause problems but I live and learn. – Onato Feb 20 '14 at 09:52

0 Answers0