点击Cell中的按钮时,如何取所在的Cell

点击Cell中的按钮时,如何取所在的Cell:

-(void)OnTouchBtnInCell:(UIButton *)btn 

CGPoint point = btn.center; 
point = [table convertPoint:point fromView:btn.superview]; 
NSIndexPath* indexpath = [table indexPathForRowAtPoint:point]; 
UITableViewCell *cell = [table cellForRowAtIndexPath:indexpath]; 

posted @ 2016-03-22 10:03  人生路1/5  阅读(188)  评论(0编辑  收藏  举报