gpt4 book ai didi

ios - uitableViewCell 的索引路径

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:52:04 25 4
gpt4 key购买 nike

<分区>

我有一个自定义方法来检测对单元格图像的点击。我还想找到图像相关单元格的索引路径,并在函数中使用它。这是我正在使用的:

CellforRowAtIndexPath:

UITapGestureRecognizer *tapped = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(cellImageTapped:)];
tapped.numberOfTapsRequired = 1;
[cell.imageView addGestureRecognizer:tapped];

我试图在以下位置获取索引路径的方法:

  -(void)cellImageTapped:(id)sender {
if(videoArray.count > 0){
Video *currentVideo = [videoArray objectAtIndex:INDEX_PATH_OF_CELL_IMAGE];
//do some stuff
}
}

我不知道如何传递索引路径。有什么想法吗?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com