-------------VIEWCONTROLLER.M-------------
#import "ViewController.h"
@interface viewcontroller () < uitableviewdatasource>
@property (weak, nonatomic) iboutlet uitableview *tableview;
@end
@implementation Viewcontroller
-(void) viewdidload
{
[super viewdidload];
Self. TableView. DataSource = self;
}
-(Nsinteger) Numberofsectionsintableview: (uitableview *) TableView
{
return 2;
}
-(Nsinteger) TableView: (uitableview *) TableView numberofrowsinsection: (nsinteger) Section
{
if (section = = 0)
{
return 2;
}
Else
{
return 3;
}
}
-(uitableviewcell *) TableView: (uitableview *) TableView Cellforrowatindexpath: (Nsindexpath *) Indexpath
{
UITableViewCell*cell = [[UITableViewCell Alloc] Initwithstyle:Uitableviewcellstyledefault Reuseidentifier:Nil];
Cell. Textlabel. text = @ " BMW ";
return cell;
}
@end
33. Small item: Car List version 1.0