Open
Description
I couldn't get the following AQGridView function to return YES for cells in the second column of the grid when tapped:
- (BOOL) _canSelectItemContainingHitView: (UIView *) hitView
I got it working by replacing:
CGPoint hitCenter = [self convertPoint:[hitView center] fromView:hitView];
for ( AQGridViewCell *aCell in [[self visibleCells] copy])
{
if ( CGRectContainsPoint( aCell.frame, hitCenter ) )
return ( YES );
}
with:
UIView *parent = hitView.superview;
while (parent != nil)
{
if ([parent isKindOfClass:[AQGridViewCell class]])
{
return ( YES );
}
parent = parent.superview;
}
This could possibly even be a bug with UIView's:
- (CGPoint)convertPoint:(CGPoint)point fromView:(UIView *)view;
(hitCenter was outside the grid view but debugging the views in the hierarchy suggests this could not be the case.)
Metadata
Assignees
Labels
No labels
Activity