Skip to content

Instantly share code, notes, and snippets.

@joshaber
Created October 13, 2012 04:41
Show Gist options
  • Save joshaber/3883251 to your computer and use it in GitHub Desktop.
Save joshaber/3883251 to your computer and use it in GitHub Desktop.
RAC(self.layer.contents) = [[[[[[RACAble(self.rowView) select:^(YourRowView *rowView) {
return RACAble(rowView, selected);
}] switch] distinctUntilChanged] injectObjectWeakly:self]
doNext:^(RACTuple *x) {
CABasicAnimation *fade = [CABasicAnimation animationWithKeyPath:@"contents"];
fade.duration = 0.15;
[[x.last layer] addAnimation:fade forKey:@"animateContents"];
}] select:^id(RACTuple *x) {
return ([x.first boolValue] ? [self highlightedGradient] : [self standardGradient]);
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment