获取cell上按钮事件

原由:点击cell上的按钮,无法获取button对应的cell位置

//获取按钮上层控件,也就是cell本身
AccountCell *cell= (AccountCell *)[按钮名称 superview];

//获取该cell本身的位置
NSIndexPath *indexPath=[self.collectionView indexPathForCell:cell];

 

posted @ 2015-12-23 18:28  -Eazy-  阅读(277)  评论(0)    收藏  举报