九宫格布局获取行/列索引
int column = 3;//列数 NSInteger count = self.dataArray.count;//数据个数 for (int i = 0; i < count; i++) { int columnIndex = i % column; // 列索引 int rowIndex = i / column; //行索引 //... }
int column = 3;//列数 NSInteger count = self.dataArray.count;//数据个数 for (int i = 0; i < count; i++) { int columnIndex = i % column; // 列索引 int rowIndex = i / column; //行索引 //... }