iOS 获取tableview自定义控件UIButton所在的
作者:
彗星来的那一夜 | 来源:发表于
2016-11-04 16:53 被阅读21次[cell.button addTarget:self action:@selector(cellButtonClicked:event:) forControlEvents:UIControlEventTouchUpInside];
// 点击事件
- (void)cellButtonClicked:(id)sender event:(id)event
{
NSSet * touches =[event allTouches];
UITouch * touch =[touches anyObject];
CGPoint currentTouchPosition = [touch locationInView:_tableView]; NSIndexPath * indexPath = [_tableView indexPathForRowAtPoint:currentTouchPosition];
if (indexPath!= nil)
本文标题:iOS 获取tableview自定义控件UIButton所在的
本文链接:https://www.haomeiwen.com/subject/xplwuttx.html
网友评论