私は、デフォルトスタイルのセルを含むUITableViewを持っています。 Xcode 4 IBでは、セル内のtextLabelの色を変更できません。私はしかし、フォントの顔&のサイズ、セルあたりの行数などを変更することができます。テキストの色ではありません。興味深いことに、私はプログラム的にもそれを行うことはできません。UITableViewCellのテキストの色を変更できません
// Give the table view a cell to display for a single row
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
// reuse or create the cell
static NSString *cellID = @"MyCustomCellIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
}
// NOTE: the setting below does not work when set either here or in IB.
cell.textLabel.textColor = [UIColor yellowColor];
// set the text for the cell
cell.textLabel.text = [appDelegate.sharedData.arrayFaves objectAtIndex:indexPath.row];
return cell;
}
私はチェックしました - 彼らは同一です。提案していただきありがとうございます。 – Bassman
プロジェクトを解凍して公衆のDropboxフォルダに貼り付けたら、それを見てみましょう。 –
完了。私はあなたにリンクを張っておくべきですか? – Bassman