Skip to content

Commit

Permalink
Fixed bug in insertItemAtIndex method in iCarousel
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklockwood authored and Nick Lockwood committed Aug 14, 2011
1 parent 58ac505 commit 3fcb67e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LICENCE.md
@@ -1,5 +1,5 @@
iCarousel
version 1.5.3, August 11th, 2011
version 1.5.4, August 14th, 2011

Copyright (C) 2011 Charcoal Design

Expand Down
4 changes: 4 additions & 0 deletions RELEASE NOTES.md
@@ -1,3 +1,7 @@
Version 1.5.4

- Fixed a bug where insertItemAtIndex method would not allow items to be inserted at the rightmost end of the carousel.

Version 1.5.3

- Fixed a bug on wrapped carousels when the total number of carousel items exceeds the number of visible items.
Expand Down
2 changes: 1 addition & 1 deletion iCarousel/iCarousel.h
@@ -1,7 +1,7 @@
//
// iCarousel.h
//
// Version 1.5.3
// Version 1.5.4
//
// Created by Nick Lockwood on 01/04/2011.
// Copyright 2010 Charcoal Design. All rights reserved.
Expand Down
4 changes: 2 additions & 2 deletions iCarousel/iCarousel.m
@@ -1,7 +1,7 @@
//
// iCarousel.m
//
// Version 1.5.3
// Version 1.5.4
//
// Created by Nick Lockwood on 01/04/2011.
// Copyright 2010 Charcoal Design. All rights reserved.
Expand Down Expand Up @@ -989,13 +989,13 @@ - (void)fadeInItemView:(UIView *)itemView

- (void)insertItemAtIndex:(NSInteger)index animated:(BOOL)animated
{
index = [self clampedIndex:index];
numberOfItems ++;
if (![dataSource respondsToSelector:@selector(numberOfVisibleItemsInCarousel:)])
{
numberOfVisibleItems ++;
}

index = [self clampedIndex:index];
[self insertView:nil atIndex:index];
UIView *itemView = [self loadViewAtIndex:index];
itemView.superview.layer.opacity = 0.0f;
Expand Down

0 comments on commit 3fcb67e

Please sign in to comment.