Skip to content

Instantly share code, notes, and snippets.

@alexrepty
Created September 24, 2010 11:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexrepty/595211 to your computer and use it in GitHub Desktop.
Save alexrepty/595211 to your computer and use it in GitHub Desktop.
- (void)show:(BOOL)animated {
self.alpha = 0.0f;
self.hidden = NO;
if (animated) {
[UIView beginAnimations:nil context:nil];
}
self.alpha = 1.0f;
if (animated) {
[UIView commitAnimations];
}
if ([_slider.subviews count] < 3) {
return;
}
UIImageView *thumbImageView = (UIImageView *)[_slider.subviews objectAtIndex:2];
if (![thumbImageView isKindOfClass:[UIImageView class]]) {
return;
}
[thumbImageView addObserver:self forKeyPath:kARPageScrubberViewKeypathFrame options:NSKeyValueChangeReplacement context:(void *)thumbImageView];
[_slider addObserver:self forKeyPath:kARPageScrubberViewKeypathTracking options:NSKeyValueChangeReplacement context:(void *)thumbImageView];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment