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
    };
    
  • 相关阅读:
    UVA 11021繁衍模型+概率计算
    LA 5059博弈+SG函数
    LA 3942 字典树
    Beat---hdu2614
    Wooden Sticks---hdu1051(最长上升子序列)
    欧拉函数基础
    1370
    钱币兑换问题---hdu1284(完全背包)
    Drainage Ditches--hdu1532(网络流 模板)
    Fibonacci--poj3070(矩阵快速幂)
  • 原文地址:https://www.cnblogs.com/skycore/p/4835593.html
Copyright © 2011-2022 走看看