更改表视图中所有单元格的文本颜色

Jac*_*ies 1 iphone uitableview ipad ios

有没有办法在表格视图中更改所有单元格中文本的颜色?我之前看过这个,它只讨论了改变一个单元格的文本颜色的方法.我的应用程序没有一定数量的单元格,所以这不起作用.

Tho*_*s K 5

在:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
Run Code Online (Sandbox Code Playgroud)

做:

cell.textLabel.textColor = [UIColor greenColor];
Run Code Online (Sandbox Code Playgroud)