【发布时间】:2014-04-15 22:20:36
【问题描述】:
当bTableView 上的一个单元格被取消选择时,我实际上要删除aTableView 上的一个单元格。而且,我使用UIViewController 而不是UITableViewController 只是因为我的应用程序上有很多东西,而且可以肯定的是,我采用了UITableViewDelegate、UITableViewDataSource。
- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
if (tableView == bTableView) { ......
MyCustomCell *cell = (MyCustomCell *)[aTableView cellForRowAtIndexPath:indexPath];
[convertResultTableView beginUpdates];
// some data updates stuff..
[UIView beginAnimations:@"quitRotation" context:NULL];
CATransform3D rotation;
rotation = CATransform3DMakeRotation((70.0 * M_PI) / 180, 0.0, 0.0, 1.0);
cell.layer.transform = rotation;
cell.layer.anchorPoint = CGPointMake(-1, 0.5);
cell.alpha = 0;
cell.layer.shadowOffset = CGSizeMake(0, 0);
[UIView commitAnimations];
[convertResultTableView endUpdates];
问题是单元格只有在第二次、第三次、第四次动画时才能正确动画,但不是第一次。 (这意味着它出现、消失、出现和消失
它仍然会做一些动画,但并不像我预期的那样,而且那个错误的动画和正确的动画之间有很大的不同。
有什么想法吗?
【问题讨论】:
标签: ios animation uitableview core-animation