Last active
December 18, 2015 09:19
-
-
Save andyarvanitis/5760710 to your computer and use it in GitHub Desktop.
Trivial example of using ReactiveCocoa with Eero.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import <ReactiveCocoa/ReactiveCocoa.h> | |
interface Reactive | |
property (retain) | |
String name | |
String address | |
registerProperties | |
end | |
implementation Reactive | |
registerProperties | |
RACAble(self.name).subscribeNext: (String newName | Log('Name changed to %@', newName)) | |
end | |
int main() | |
object := Reactive.new | |
object.registerProperties | |
object.name = 'eero' | |
object.name = 'saarinen' | |
return 0 | |
. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment