• 获取cell数组


    //获取cell数组

    - (NSArray *)cellsForTableView:(UITableView *)tableView {

        NSInteger sections = tableView.numberOfSections;

        NSMutableArray * cells = [NSMutableArray arrayWithCapacity:1];

        for (int i = 0; i < sections; i++) {

            NSInteger rows = [tableView numberOfRowsInSection:i];

            NSMutableArray * sectionCells = [NSMutableArray arrayWithCapacity:1];

            for (int j = 0; j < rows; j++) {

                NSIndexPath * indexPath = [NSIndexPath indexPathForRow:j inSection:i];

                [sectionCells addObject:[tableView cellForRowAtIndexPath:indexPath]];

            }

            [cells addObject:sectionCells];

        }

        return [NSArray arrayWithArray:cells];

    }

  • 相关阅读:
    四叶草社交平台——十天冲刺(7)
    四叶草社交平台——十天冲刺(6)
    多表查询
    单表 查询
    django模板的导入
    2019-3-1
    DJANGO 28
    路由
    Django项目的创建与介绍
    数据传输方式
  • 原文地址:https://www.cnblogs.com/yujidewu/p/6957968.html
Copyright © 2020-2023  润新知