And*_*Dev 4 iphone uitableview
基本上我想检查是否已经加载/查看了UITableView中的单元格,因此我可以在单元格的第一个视图上执行动画.有谁知道我会怎么做呢?
我猜这可能是一种倒退的方式,如果你能想到一个更好的检查方式,那么我就是耳朵.
提前致谢!
您应该触发动画并跟踪已经显示的索引路径 tableView:willDisplayCell:forRowAtIndexPath:
- (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.
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
872 次 |
| 最近记录: |