关于[UITableView setEditing:YES animated:YES] 没有animation

发布时间:2020-07-08 16:17:56 作者:zql5666641
来源:网络 阅读:1173

 最近遇到[UITableView setEditing:YES animated:YES]后 没有animation的效果 

于是发现 如果在[UITableView setEditing:YES animated:YES]  后直接使用[UITableView reloadData];的话不显示animation

于是解决方案

   [CATransaction begin];

    [CATransaction setCompletionBlock: ^{

        animation 完了之后要运行的代码

        

    }];

    [_tblView setEditing:YES animated:YES];

 

    [CATransaction commit];

或者

[UIView animateWithDuration:0.3f                  animations:^{                      [self.tableView setEditing:YES animated:NO];                  }                   completion:^(BOOL finished){                      animation 完了之后要运行的代码                  } ]; 都是可以的

推荐阅读:
  1. Android动画Animator开发问题
  2. 微信小程序中animation循环动画怎么实现让云朵飘的效果

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

animation uitableview yes

上一篇:一步步带你实现web全景看房——three.js

下一篇:nagios /pnp4nagios/index.php was not found

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》