File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,6 +172,7 @@ extern NSString * const AQGridViewSelectionDidChangeNotification;
172172- (CGRect) rectForItemAtIndex : (NSUInteger ) index ;
173173- (AQGridViewCell *) cellForItemAtIndex : (NSUInteger ) index ;
174174- (NSUInteger ) indexForItemAtPoint : (CGPoint) point ;
175+ - (NSUInteger ) indexForCell : (AQGridViewCell *) cell ;
175176- (AQGridViewCell *) cellForItemAtPoint : (CGPoint) point ;
176177
177178- (NSArray *) visibleCells ;
Original file line number Diff line number Diff line change @@ -615,6 +615,15 @@ - (NSUInteger) indexForItemAtPoint: (CGPoint) point
615615 return ( [_gridData itemIndexForPoint: point] );
616616}
617617
618+ - (NSUInteger ) indexForCell : (AQGridViewCell *) cell
619+ {
620+ NSUInteger index = [_visibleCells indexOfObject: cell];
621+ if (index == NSNotFound )
622+ return NSNotFound ;
623+
624+ return _visibleIndices.location + index;
625+ }
626+
618627- (AQGridViewCell *) cellForItemAtPoint : (CGPoint) point
619628{
620629 return ( [self cellForItemAtIndex: [_gridData itemIndexForPoint: point]] );
You can’t perform that action at this time.
0 commit comments