Jack Humphries Jack Humphries - 1 month ago 7
iOS Question

Change the text color of all the cells in a table view

Is there a way to change the color of the text in ALL of the cells in a table view? I've looked this up before and it only talks about ways to change the text color of one cell. And my app does not have a set number of cells, so this wouldn't work.

Answer

In:

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

Do:

cell.textLabel.textColor = [UIColor greenColor];