我有一個自定義單元格。這樣如何在CustomCell按鈕中檢測indexPath.row單擊?
有按鈕,就像LIKE,評價,分享。
我想在indexPath.row方法中點擊這些按鈕。
我做了協議這樣
@protocol Cell_StreamCellDelegate
@required
-(void)like;
-(void)comment;
-(void)share;
@end
我打電話給他們時CELL.m方法,比如下面
-(IBAction)likePressed:(id)sender{
[delegate like];
}
-(IBAction)commentPressed:(id)sender{
[delegate comment];
}
-(IBAction)sharePressed:(id)sender{
[delegate share];
}
但我無法獲取indexPath.row。我想獲得一個特定索引的對象。
感謝
我現在做了,在你的文章之前,讓我測試一下,如果它有效,我會感激 – Duaan