【发布时间】:2013-11-28 11:21:09
【问题描述】:
我有一个可变数组。我想在 UITableView 中设置文本的框架。
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
cell.textLabel.text = [appDelegate.UnitTypeAry objectAtIndex:indexPath.row];
cell.textLabel.frame = CGRectMake(10, 10, 150, 40);
【问题讨论】:
-
要么创建自定义 UILabel 并添加到 cell.contentView 中,要么覆盖 layoutSubviews 如this
-
是的...我要添加数组文本的框架
标签: ios iphone uitableview ios5 nsmutablearray