Permalink
Browse files

fixed arrow direction for bottom PTR

  • Loading branch information...
chrispix committed Jan 4, 2012
1 parent f03c034 commit a78ed8bb0bd7ec25a316106368c66fa7e21c5bca
Showing with 2 additions and 1 deletion.
  1. +2 −1 PullToRefreshView.m
View
@@ -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];
}
@@ -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)]) {

0 comments on commit a78ed8b

Please sign in to comment.