UITableView from NSMutableArray iPhone



我有一个对象为1-10(假设)的数组。我想让cell。textlabel。text = 1,3,5,7…我想让cell.detailtextLabel.text = 2,4,6,8…

如何使详细信息文本交替?

或者,有没有更好的方法?制作两个可变射线并将它们组合起来?

我想这应该行得通:

cell.textLabel.text = [yourlist objectAtIndex:(indexPath.row * 2)];
cell.detailtextLabel.text = [yourlist objectAtIndex:(indexPath.row * 2)+1];

最新更新