目标C对我来说是新的。如何更改表格视图中文本字段的字体?这是我现在有代码:如何在表格视图中更改文本字段的字体
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
if (indexPath.section==0)
{
UITextField *textField= [[UITextField alloc] initWithFrame:CGRectMake(0, 0, 205, 21)];
textField.placeholder = @" ";
//textField.text = [listOfItems objectAtIndex:indexPath.row];
textField.tag = indexPath.row;
//textField.textLabel.font = [UIFont fontWithName:@"Helvetica" size:12];
//textField.placeholder = [TeamBDict objectAtIndex:textField.tag];
textField.delegate = self;
cell.accessoryView = textField;
[textField release];
}
的注释行也将这样做。 'textField.textLabel.font = [UIFont fontWithName:@“Helvetica”size:12];' – 2012-03-23 15:18:15
请阅读stackoverflow的FAQ。 – Danra 2012-03-23 15:18:21