0
這是我tableviewcell是如何設置改變一個UITableViewCell子視圖的UILabel文本
else if(indexPath.row == 3)
{
cell.textLabel.text = @"Category";
UILabel *categoryLabel = [[UILabel alloc] initWithFrame:CGRectMake(150, 2, 145, 34)];
categoryLabel.adjustsFontSizeToFitWidth = YES;
categoryLabel.textColor = [UIColor blackColor];
categoryLabel.font = [UIFont systemFontOfSize:17.0];
categoryLabel.text = @"select a category";
categoryLabel.backgroundColor = [UIColor clearColor];
categoryLabel.textAlignment = UITextAlignmentRight;
categoryLabel.tag = 3;
[cell addSubview:categoryLabel];
[categoryLabel release];
}
我稍後需要更改程序類別標籤的文本。 我該如何做到這一點?我假設我需要使用標籤來引用UILabel?
如果完成,請關閉該問題。 – 2011-05-25 17:03:25
我該如何解決這個問題? – Hackmodford 2011-11-18 19:34:58