Permalink
Browse files

Fixed issue #44 insertObjectAtIndex bug.

  • Loading branch information...
1 parent e4dff0a commit 793972ace38b64b63aaab6e793fe19efd493ce3a @PongPong committed Mar 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 GMGridView/API/GMGridView.m
View
2 GMGridView/API/GMGridView.m
@@ -1424,7 +1424,7 @@ - (void)insertObjectAtIndex:(NSInteger)index
{
cell = [self newItemSubViewForPosition:index];
- for (int i = index; i < _numberTotalItems; i++)
+ for (int i = _numberToTotalItems - 1; i >= index; i--)
{
UIView *oldView = [self cellForItemAtIndex:i];
oldView.tag = oldView.tag + 1;

0 comments on commit 793972a

Please sign in to comment.