GMGridView cell button
生活随笔
收集整理的這篇文章主要介紹了
GMGridView cell button
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在GMGridView的cell里面添加button的時候,不能響應touch up inside事件。
解決方法:https://github.com/gmoledina/GMGridView/issues/68
在gmgridview.m文件中作修改,添加以下方法可解決問題。
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {if ( gestureRecognizer == _tapGesture || gestureRecognizer == _sortingLongPressGesture ) {if ( [touch.view isDescendantOfView:self] ) {// Test if the touched view is a subview of a controlfor ( UIView *view = touch.view ; view != self ; view = view.superview )if ( [view isKindOfClass:[UIControl class]] )return NO;}}return YES; }轉載于:https://www.cnblogs.com/usst/archive/2012/11/16/2774042.html
總結
以上是生活随笔為你收集整理的GMGridView cell button的全部內容,希望文章能夠幫你解決所遇到的問題。