我想从cellForRowAtIndexPath:
cell.textLabel.textColor = [UIColor blueColor];
答案 0 :(得分:0)
通过使用cellForRowAtIndexPath:
对象调用NSIndexPath
并将row
设置为零来检索单元格,然后设置颜色。在IBAction
方法中,请执行以下操作:
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
cell.textLabel.textColor = [UIColor blueColor];