Last active
December 17, 2015 14:08
-
-
Save ashfurrow/5621841 to your computer and use it in GitHub Desktop.
ReactiveCocoa RACSubject Example
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
self.gestureRecognizerIsRunningSubject = [RACSubject subject]; | |
self.gestureRecognizerValueSubject = [RACSubject subject]; | |
RAC(self.someView.frame) = [self.gestureRecognizerValueSubject map:^id(NSValue *value) { | |
CGPoint location = [value CGPointValue]; | |
CGFloat size = 100.0f; | |
return [NSValue valueWithCGRect:CGRectMake(location.x - size/2.0f, location.y - size/2.0f, size, size)]; | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment