zoukankan      html  css  js  c++  java
  • [iOS]UITableView刷新

    刷新整个tableView

    [self.tableView reloadData];

    刷新局部cell

    NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
    [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationFade];

    局部刷新section

    NSIndexSet *indexSet = [[NSIndexSet alloc] initWithIndex:0];
    [self.tableView reloadSections:indexSet withRowAnimation:UITableViewRowAnimationFade];

     刷新动画

    typedef NS_ENUM(NSInteger, UITableViewRowAnimation) {
        UITableViewRowAnimationFade,   //淡入淡出
        UITableViewRowAnimationRight,  //从右滑入         // slide in from right (or out to right)
        UITableViewRowAnimationLeft,   //从左滑入
        UITableViewRowAnimationTop,     //从上滑入
        UITableViewRowAnimationBottom,  //从下滑入
        UITableViewRowAnimationNone,            // available in iOS 3.0
        UITableViewRowAnimationMiddle,          // available in iOS 3.2.  attempts to keep cell centered in the space it will/did occupy
        UITableViewRowAnimationAutomatic = 100  // available in iOS 5.0.  chooses an appropriate animation style for you
    };
    
  • 相关阅读:
    第五周活动进度表
    第四周学习进度条
    软件工程概论作业3
    第三周活动进度
    小学生运算程序2
    课堂作业1
    jsp登陆界面代码
    《构建之法》读书笔记04
    《构建之法》读书笔记03
    《构建之法》读书笔记02
  • 原文地址:https://www.cnblogs.com/skycore/p/4835593.html
Copyright © 2011-2022 走看看