Skip to content

Commit 09e843b

Browse files
Jon ChmuraJon Chmura
Jon Chmura
authored and
Jon Chmura
committed
Fixed linting
1 parent 5005c2f commit 09e843b

2 files changed

+7
-5
lines changed

JazzHands/IFTTTAnimatedPagingScrollViewController.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
@property (nonatomic, strong) IFTTTAnimator *animator;
1616
@property (nonatomic, strong) UIScrollView *scrollView;
1717
@property (nonatomic, strong) UIView *contentView;
18-
1918
@property (nonatomic, assign) CGFloat pageOffset;
19+
2020
- (NSUInteger)numberOfPages;
2121
- (CGFloat)pageWidth;
2222

JazzHands/IFTTTAnimatedPagingScrollViewController.m

+6-4
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,11 @@ - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrie
152152

153153
- (void)setPageOffset:(CGFloat)pageOffset
154154
{
155-
if (pageOffset < 0 || pageOffset > ([self numberOfPages] - 1)) { return; }
155+
if (pageOffset < 0.f || pageOffset > (CGFloat) ([self numberOfPages] - 1)) {
156+
return;
157+
}
156158

159+
_pageOffset = pageOffset;
157160
self.scrollView.contentOffset = CGPointMake(self.pageWidth * pageOffset, 0.f);
158161
[self animateCurrentFrame];
159162
}
@@ -164,9 +167,8 @@ - (void)updatePageOffset
164167
CGFloat currentOffset = self.scrollView.contentOffset.x;
165168
currentOffset = currentOffset / self.pageWidth;
166169
_pageOffset = currentOffset;
167-
}
168-
else {
169-
_pageOffset = 0;
170+
} else {
171+
_pageOffset = 0.f;
170172
}
171173
}
172174

0 commit comments

Comments
 (0)