`
zjjzmw1
  • 浏览: 1354165 次
  • 性别: Icon_minigender_1
  • 来自: 开封
社区版块
存档分类
最新评论

UITableView展开合上的动画。

    博客分类:
  • iOS
阅读更多

右边那个那个图片会从左边飞过来,,,如果用自定义cell就不会了。。。。

 

-(void)tapAction:(id)sender{

    UIButton *tempBtn = (UIButton *)sender;

   self.openString = [NSString stringWithFormat:@"%d",tempBtn.tag];

    

    if ([self.openArraycontainsObject:self.openString]) {

        [self.openArrayremoveObject:self.openString];

    }else{

        [self.openArrayaddObject:self.openString];

    }

  [self.tableViewreloadSections:[NSIndexSetindexSetWithIndex:tempBtn.tag] withRowAnimation:UITableViewRowAnimationFade];

上面不放在下面的动画块里面就行了。。。。否则section,的title 会有一个闪的效果很不好。

   /// [UIViewanimateWithDuration:0.2fanimations:^{

       [self.tableViewreloadSections:[NSIndexSetindexSetWithIndex:tempBtn.tag] withRowAnimation:UITableViewRowAnimationFade];

    } completion:^(BOOL finished) {

        

    }];

    

    

 

}

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics