gmoledina / GMGridView

A performant Grid-View for iOS (iPhone/iPad) that allows sorting of views with gestures (the user can move the items with his finger to sort them) and pinching/rotating/panning gestures allow the user to play with the view and toggle from the cellview to a fullsize display.
MIT License
2.3k stars 512 forks source link

ios 5.1 and lower issue #194

Closed alekseypotapov-dev closed 11 years ago

alekseypotapov-dev commented 11 years ago

I have GridView's cell as a separate screen. And some components (buttons, etc) on it. The problem is, that in ios 6+ I can get access to that components (button clicks and so on) but not in 5.0 and 5.1. In this case when I try to interact with screen (cell) the method

- (void)GMGridView:(GMGridView *)gridView didTapOnItemAtIndex:(NSInteger)position

is called with the same "position" (actually it shows the number of current cell) The question is - how can I make components on the gridView cell active on ios 5.0 as on ios 6+?

alekseypotapov-dev commented 11 years ago

The solution was just add the following code to GMGridView.m

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
 if ([touch.view isKindOfClass:[UIButton class]])
 {
    return NO;
 }
    return YES;
}