我做了一个"pull-to-refresh“,当更新完成后,使用动画块删除插图。然而,我在自定义uitableviewcell中得到了不需要的动画,请参阅电影:
https://www.youtube.com/watch?v=rZcEBm_fTUc&feature=youtu.be
仔细观察底部。我发现了这个:How can I exclude a piece of code inside a core animation block from being animated?
但是不知道如何使用它,下面是我使用的代码:
id animation = ^{
//Remove the contentinset
[self.tableView setContentInset:refreshView.initialInset];
};
[UIView animateWithDuration:0.5
delay:0
options:UIViewAnimationOptionAllowUserInteraction |UIViewAnimationOptionBeginFromCurrentState
animations:animation
completion:nil];
[refreshView endAnimation];
}感谢在这件事上的任何帮助!
发布于 2014-09-15 22:47:30
我没有正确重用我的UITableViewCells。在我从单元格中删除所有子视图并重新添加它们之前,这样做是错误的。
通过对我的不同UITableViewCells使用"reuseIdentifier“,并仅在问题消失后实例化UILabels和UIButtons (以及许多其他问题)
https://stackoverflow.com/questions/25059659
复制相似问题