You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In each cell in my grid I have added a UIButton but when the button is pressed then both the button action is called as well as the -gridView:didSelectItemAtIndexPath:. In a regular UITableView the actual cell get activated if the press happens on a button.
Also, the button is only called the first time it's pressed: since the cell is also selected and active any of the following presses doesn't get filtered to the UIButton.
The text was updated successfully, but these errors were encountered:
Thanks for noticing this bug... We definitely need to fix this so that the cell exhibits the expected behavior. However, it's not exactly the highest priority at the moment, as there are more pressing issues to deal with presently.
In the meanwhile, I'd recommend against embedding buttons in cells from a pure UX standpoint. Typically in iOS interfaces, we want the entire cell itself to perform the action. If your cell requires multiple actions (which is the only use-case I can think of for embedding a button), then you should do this with modes rather than with multiple inputs. For instance, you might have a multiselection mode, a deletion mode, or whatever sort of mode you want, which will determine the action that tapping on the entire cell performs. That's just my two cents.
So, it's a totally legitimate issue, but for now, I'd suggest that you just go with a different design if at all possible. I'm going to leave the issue open, since we do need to fix this at some point.
This is a bit old, but in order to fix this issue, in the GMGridView.m, add the UIGestureDetectorDelegate method
'(BOOL)gestureRecognizer:shouldReceiveTouch:'
In each cell in my grid I have added a
UIButton
but when the button is pressed then both the button action is called as well as the-gridView:didSelectItemAtIndexPath:
. In a regularUITableView
the actual cell get activated if the press happens on a button.Also, the button is only called the first time it's pressed: since the cell is also selected and active any of the following presses doesn't get filtered to the
UIButton
.The text was updated successfully, but these errors were encountered: