Skip to content

Instantly share code, notes, and snippets.

@almostintuitive
Created August 30, 2014 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save almostintuitive/8ab9a3fcbc2531803fa3 to your computer and use it in GitHub Desktop.
Save almostintuitive/8ab9a3fcbc2531803fa3 to your computer and use it in GitHub Desktop.
SwipeToPeepCell-5.m
- (void)changeBackgroundColorBasedOnProgress:(float)progress {
self.interactiveBackground.alpha = progress;
}
- (void)didMoveToSuperview {
self.interactiveBackground = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, self.bounds.size.height)];
self.interactiveBackground.backgroundColor = [UIColor flatGrayColor];
self.interactiveBackground.alpha = 0;
[self insertSubview:self.interactiveBackground atIndex:0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment