Last active
August 29, 2015 14:10
-
-
Save rudyjahchan/1bf70697a57adc5c33e7 to your computer and use it in GitHub Desktop.
This file contains 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
RAC(self, 'titleLabel.text') = | |
[self.selectedRegion map:^NSString*(WTFRegion *region) { | |
return region.title; | |
}]; | |
RACSignal *regionRect = [self.selectedRegion map:^NSValue*(WTFRegion *region) { | |
return [NSValue valueFromMKMapRect:region.rect]; | |
}]; | |
[self.mapView rac_liftSelector:@selector(setVisibleMapRect:animated:) | |
withSignals:regionRect, [RACSignal return:@(YES)], nil]; | |
RACSignal *annotations = [self rac_liftSelector:@selector(fetchAnnotationsForRegion:) | |
withObjects:selectedRegion, nil]; | |
[self.mapView rac_liftSelector:@selector(addAnnotations:) | |
withSignals:annotations, nil]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment