indexpath.section ..如何在tableview中进入部分?

时间:2013-01-31 08:10:32

标签: iphone objective-c xcode

我有一个带有部分的表视图,每个部分都有自己的数组......我有13个部分,每个部分都有不同的主题。 我该怎么办?

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

如何进行切换?

Switch(indexpath.section)

1 个答案:

答案 0 :(得分:0)

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath `

switch (indexPath.section) {

case 0: cell.textLabel.text=@""; break; 。 。 。  case n:

//display whatever want break; default: break; } }

相关问题