Skip to content

Commit 5c5f5f8

Browse files
committed
determineScrollingAbility is now one-line of code.
1 parent 01f4aac commit 5c5f5f8

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Classes/MTZWhatsNewViewController/MTZCollectionView.m

+1-6
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,7 @@ - (void)setFrame:(CGRect)frame
2424

2525
- (void)determineScrollingAbility
2626
{
27-
if (self.contentSize.height <= self.frame.size.height &&
28-
self.contentSize.width <= self.frame.size.width) {
29-
self.scrollEnabled = NO;
30-
} else {
31-
self.scrollEnabled = YES;
32-
}
27+
self.scrollEnabled = self.contentSize.height > self.frame.size.height || self.contentSize.width > self.frame.size.width;
3328
}
3429

3530
@end

0 commit comments

Comments
 (0)