首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从UIAnimation中排除视图

从UIAnimation中排除视图
EN

Stack Overflow用户
提问于 2014-07-31 21:07:11
回答 1查看 41关注 0票数 1

我做了一个"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?

但是不知道如何使用它,下面是我使用的代码:

代码语言:javascript
复制
    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];
}

感谢在这件事上的任何帮助!

EN

回答 1

Stack Overflow用户

发布于 2014-09-15 22:47:30

我没有正确重用我的UITableViewCells。在我从单元格中删除所有子视图并重新添加它们之前,这样做是错误的。

通过对我的不同UITableViewCells使用"reuseIdentifier“,并仅在问题消失后实例化UILabels和UIButtons (以及许多其他问题)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25059659

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档