-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section?
If i needed more rows in one section than another, is ther开发者_如何转开发e a code i could implement to do this?
I have 3 sections altogether but in one section i require 6 rows, in another only 3, and in the last perhaps 3 again.
Regards, Jon
You just implement the method in the title that returns a different number for different section
.
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section == 0)
return 6;
else
return 3;
}
精彩评论