实现将 [[0,1,2],[0,1,2,3,4,5,6]] 分成[ [0,1 ],[2 , ] ], [[0,1],[2,3]的

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

           NSMutableArray * arr3 = [[NSMutableArray alloc] init];
        for (NSArray * ss1 in _GuoneidataSource) {
            
            
            NSMutableArray * arr2 = [[NSMutableArray alloc] init];
              if (ss1.count%2==0) {
                   for (int  i=0; i<ss1.count; i+=2)
                   {
                    NSMutableArray * arr4 = [[NSMutableArray alloc]init];
                       [arr4 addObject:ss1[i]];
                       [arr4 addObject:ss1[i+1]];
                      [arr2 addObject:arr4];
                   }
                  
                }
                else if (ss1.count%2==1)
                   {
                    for (int  i=0; i<ss1.count; i+=2) {
                        NSMutableArray * arr1 = [[NSMutableArray alloc] init];
                        if (i == ss1.count - 1) {
                            [arr1 addObject:ss1[i]];
                        }else {
                            [arr1 addObject:ss1[i]];
                            [arr1 addObject:ss1[i+1]];
                            
                        }
                        [arr2 addObject:arr1];
                        }
                }
            [arr3 addObject:arr2];
        }
        _ss  = [NSMutableArray arrayWithArray:arr3];
        [_tabelView reloadData];