Skip to content

Commit

Permalink
Minor renaming to honor naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
zen committed Feb 11, 2015
1 parent 753c52e commit b085125
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ZLSwipeableView/ZLSwipeableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import "ZLSwipeableView.h"
#import "ZLPanGestureRecognizer.h"

const NSUInteger kNumPrefetchedViews = 3;
const NSUInteger ZLPrefetchedViewsNumber = 3;

ZLSwipeableViewDirection ZLDirectionVectorToSwipeableViewDirection(CGVector directionVector) {
ZLSwipeableViewDirection direction = ZLSwipeableViewDirectionNone;
Expand All @@ -30,8 +30,7 @@ ZLSwipeableViewDirection ZLDirectionVectorToSwipeableViewDirection(CGVector dire
return direction;
}

@interface ZLSwipeableView () <UICollisionBehaviorDelegate,
UIDynamicAnimatorDelegate>
@interface ZLSwipeableView () <UICollisionBehaviorDelegate, UIDynamicAnimatorDelegate>

// UIDynamicAnimators
@property (strong, nonatomic) UIDynamicAnimator *animator;
Expand Down Expand Up @@ -142,7 +141,7 @@ - (void)loadNextSwipeableViewsIfNeeded {
- (void)loadNextSwipeableViewsIfNeeded:(BOOL)animated {
NSInteger numViews = self.containerView.subviews.count;
NSMutableSet *newViews = [NSMutableSet set];
for (NSInteger i = numViews; i < kNumPrefetchedViews; i++) {
for (NSInteger i = numViews; i < ZLPrefetchedViewsNumber; i++) {
UIView *nextView = [self nextSwipeableView];
if (nextView) {
[self.containerView addSubview:nextView];
Expand All @@ -154,7 +153,7 @@ - (void)loadNextSwipeableViewsIfNeeded:(BOOL)animated {

if (animated) {
NSTimeInterval maxDelay = 0.3;
NSTimeInterval delayStep = maxDelay / kNumPrefetchedViews;
NSTimeInterval delayStep = maxDelay / ZLPrefetchedViewsNumber;
NSTimeInterval aggregatedDelay = maxDelay;
NSTimeInterval animationDuration = 0.25;
for (UIView *view in newViews) {
Expand Down

0 comments on commit b085125

Please sign in to comment.