Iphone 如何确定UITableViewCell之前是否已加载?

Iphone 如何确定UITableViewCell之前是否已加载?,iphone,uitableview,Iphone,Uitableview,基本上,我想检查UITableView中的单元格之前是否已加载/查看,以便在单元格的第一个视图上执行动画。有人知道我会怎么做吗 我猜这可能是一种倒退的方法,如果你能想出一种更好的检查方法,那么我洗耳恭听 提前谢谢 您应该触发动画并跟踪哪些索引路径已经显示在表视图中:willDisplayCell:forrowatinexpath: - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell

基本上,我想检查UITableView中的单元格之前是否已加载/查看,以便在单元格的第一个视图上执行动画。有人知道我会怎么做吗

我猜这可能是一种倒退的方法,如果你能想出一种更好的检查方法,那么我洗耳恭听


提前谢谢

您应该触发动画并跟踪哪些索引路径已经显示在
表视图中:willDisplayCell:forrowatinexpath:

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
    // NSMutableSet *animatedIndexPaths; <-- this is an ivar.
    if (![animatedIndexPaths containsObject:indexPath])
    {
        [animatedIndexPaths addObject:indexPath];
        // Trigger your cell animation on cell.
    }
}
-(void)tableView:(UITableView*)tableView将显示单元格:(UITableViewCell*)用于rowatindexpath的单元格:(nsindepath*)indepath
{

//NSMutableSet*AnimatedIndexPath;太棒了!在5分钟内实现并运行。为您的帮助干杯!@AndyDev:如果它有效,请“接受”答案,这样它就可以帮助其他人解决同样的问题。谢谢!