uitableview单元格的iOS UIViewAnimation
目前,我有一个表视图,如果选择了一个单元格,则会使用动画UITableViewRowAnimationFade在选定索引路径处重新加载该表中的一个单元格。我不太喜欢它,因为它波涛汹涌,不平滑。我对UIView动画一点也不熟悉,希望能了解更多。如何设置此操作的动画,使其更平滑、更美观?谢谢 代码:uitableview单元格的iOS UIViewAnimation,ios,animation,uitableview,tableview,uiviewanimation,Ios,Animation,Uitableview,Tableview,Uiviewanimation,目前,我有一个表视图,如果选择了一个单元格,则会使用动画UITableViewRowAnimationFade在选定索引路径处重新加载该表中的一个单元格。我不太喜欢它,因为它波涛汹涌,不平滑。我对UIView动画一点也不熟悉,希望能了解更多。如何设置此操作的动画,使其更平滑、更美观?谢谢 代码: 您的单元格是否很重(即需要计算的内容很多?)。除了类型之外,您无法控制UITableViewCell动画的详细信息。它们不是超重的,但如果重要的话,它们是子类表格单元格。。。 - (void)table
您的单元格是否很重(即需要计算的内容很多?)。除了类型之外,您无法控制
UITableViewCell
动画的详细信息。它们不是超重的,但如果重要的话,它们是子类表格单元格。。。
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (selectedCellIndexPath == indexPath.row) {
selectedCellIndexPath = -1;
[callsTableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
return;
}
if (selectedCellIndexPath >= 0)
{
NSIndexPath *previousPath = [NSIndexPath indexPathForRow:selectedCellIndexPath inSection:0];
selectedCellIndexPath = indexPath.row;
[callsTableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:previousPath] withRowAnimation:UITableViewRowAnimationFade];
}
selectedCellIndexPath = indexPath.row;
[callsTableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}