2017-07-07 39 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; 

} 
相關問題