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的全部内容,希望文章能够帮你解决所遇到的问题。