Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions iCarousel/iCarousel.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) CGFloat perspective;
@property (nonatomic, assign) CGFloat decelerationRate;
@property (nonatomic, assign) CGFloat scrollSpeed;
@property (nonatomic, assign) NSTimeInterval defaultScrollDuration;
@property (nonatomic, assign) CGFloat bounceDistance;
@property (nonatomic, assign, getter = isScrollEnabled) BOOL scrollEnabled;
@property (nonatomic, assign, getter = isPagingEnabled) BOOL pagingEnabled;
Expand Down
3 changes: 2 additions & 1 deletion iCarousel/iCarousel.m
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ - (void)setUp
_contentOffset = CGSizeZero;
_viewpointOffset = CGSizeZero;
_scrollSpeed = 1.0;
_defaultScrollDuration = SCROLL_DURATION;
_bounceDistance = 1.0;
_stopAtItemBoundary = YES;
_scrollToItemBoundary = YES;
Expand Down Expand Up @@ -1492,7 +1493,7 @@ - (void)scrollToItemAtIndex:(NSInteger)index duration:(NSTimeInterval)duration

- (void)scrollToItemAtIndex:(NSInteger)index animated:(BOOL)animated
{
[self scrollToItemAtIndex:index duration:animated? SCROLL_DURATION: 0];
[self scrollToItemAtIndex:index duration:animated? self.defaultScrollDuration: 0];
}

- (void)removeItemAtIndex:(NSInteger)index animated:(BOOL)animated
Expand Down