Created
August 27, 2013 18:13
-
-
Save wbarksdale/6357024 to your computer and use it in GitHub Desktop.
UIScrollView sucks
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.frame = newframe; | |
self.unstackedRect = newframe; | |
self.subview.frame = CGRectMake(self.subview.frame.origin.x, | |
self.subview.frame.origin.y, | |
self.imageViews.count * 98, | |
99); | |
self.contentSize = CGSizeMake(self.imageViews.count * 98, self.subview.frame.size.height); | |
[self setScrollEnabled:YES]; | |
[UIView animateWithDuration:.5f | |
delay:0.0f | |
options: UIViewAnimationOptionCurveEaseOut | |
animations:^{ | |
for(int i = 1; i < self.imageViews.count; i++){ | |
UIImageView *iv = [self.imageViews objectAtIndex:i]; | |
float newx = (98 * i) + 9; | |
iv.center = CGPointMake((iv.center.x + newx), iv.center.y); | |
} | |
} completion:^(BOOL finished) { | |
NSLog(@"donezo"); | |
[self setNeedsDisplay]; | |
[self.subview setNeedsDisplay]; | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment