我想将标签子视图添加到 UITableViewCell。我可以轻松地将框架原点和大小设置为特定值,但是如何使用当前/默认单元格标签高度和位置?
UILabel *labPerHour;
cell.textLabel.text = @"Rate";
labPerHour = [[UILabel alloc] init];
//labPerHour.frame = CGRectMake( 280, cell.textLabel.frame.origin.y, 80, cell.textLabel.frame.size.height );
labPerHour.frame = CGRectMake( 260, 7, 30, 30 );
labPerHour.text = @"$/hr";
[cell addSubview:labPerHour];
我希望注释掉的行起作用..或类似的东西。
有人可以帮忙吗?这段代码当然是我的 cellForRowAtIndexPath 方法的一部分。