Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ipad 在UISplitView控制器中更改根视图控制器的颜色_Ipad - Fatal编程技术网

Ipad 在UISplitView控制器中更改根视图控制器的颜色

Ipad 在UISplitView控制器中更改根视图控制器的颜色,ipad,Ipad,我想在UISplitView控制器中更改RootView控制器左侧的文本颜色和背景颜色。这需要在两个方向上进行。要更改文本颜色: // Dequeue or create a cell of the appropriate type. UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCe

我想在UISplitView控制器中更改RootView控制器左侧的文本颜色和背景颜色。这需要在两个方向上进行。

要更改文本颜色:

// Dequeue or create a cell of the appropriate type.
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    cell.accessoryType = UITableViewCellAccessoryNone;
}

// Configure the cell.
cell.textLabel.text = [[data objectAtIndex:indexPath.row] retain];
cell.textColor = [UIColor blueColor]; //Here you can use whatever color you want
return cell;

RootViewController是UINavigationController、UITableViewController还是其他什么?RootViewController是用IB设计的还是用代码设计的?您尝试过什么?cell.textColor不推荐使用,请改用cell.textLabel.textColor