-2

我想要这个作品出来cellForRowAtIndexPath:

cell.textLabel.textColor = [UIColor blueColor];
4

1 回答 1

0

cellForRowAtIndexPath:通过调用设置为零的NSIndexPath对象来检索单元格row,然后设置颜色。在您的IBAction方法中,执行以下操作:

NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];

cell.textLabel.textColor = [UIColor blueColor];
于 2013-11-08T16:38:44.750 回答