2017-07-07 47 views

回答

2

如果你需要做到这一点使用UITableView,你可以选择自定义UITableViewCell

否则它能够更好地做UICollectionView

0

使用泰伯维:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{  
    static NSString *CellIdentifier = @"Cell"; 
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; 

    UILabel *labelData1 = ...; 
    labelData1.text = @"333"; 
    UILabel *labelData2 = ...; 
    labelData2.text = @"56"; 
    UILabel *labelData3 = ...; 
    labelData3.text = @"12"; 

    UILabel *label1 = ...; 
    label1.text = @"Questions"; 
    UILabel *label2 = ...; 
    label2.text = @"Sections"; 
    UILabel *label3 = ...; 
    label3.text = @"Exams"; 

    return cell; 

}