Skip to content

Commit

Permalink
fixed arrow direction for bottom PTR
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispix committed Jan 4, 2012
1 parent f03c034 commit a78ed8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PullToRefreshView.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (void)showActivity:(BOOL)shouldShow animated:(BOOL)animated {
- (void)setImageFlipped:(BOOL)flipped {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.1f];
self.arrowImage.transform = (flipped ? CATransform3DMakeRotation(M_PI * 2, 0.0f, 0.0f, 1.0f) : CATransform3DMakeRotation(M_PI, 0.0f, 0.0f, 1.0f));
self.arrowImage.transform = (flipped ^ isBottom ? CATransform3DMakeRotation(M_PI * 2, 0.0f, 0.0f, 1.0f) : CATransform3DMakeRotation(M_PI, 0.0f, 0.0f, 1.0f));
[UIView commitAnimations];
}

Expand Down Expand Up @@ -120,6 +120,7 @@ - (id)initWithScrollView:(UIScrollView *)scroll atBottom:(BOOL)atBottom {
self.arrowImage.contents = (id) arrow.CGImage;
self.arrowImage.frame = CGRectMake(25.0f, visibleBottom - kViewHeight + 5.0f, arrow.size.width, arrow.size.height);
self.arrowImage.contentsGravity = kCAGravityResizeAspect;
[self setImageFlipped:NO];

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) {
Expand Down

0 comments on commit a78ed8b

Please sign in to comment.