я использую ниже код, чтобы изменить текст звукозаписывающей компанией моего обычая uitableviewcell
:Текст метки в CustomUITableView не меняется
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
//NSArray *allsubviews = [[NSBundle mainBundle] loadNibNamed:@"LICustomUI" owner:nil options:nil];
//LIMerchantTableViewCell *cell = [allsubviews objectAtIndex:LIApplicationLayout() == LIApplicationDirectionRightToLeft ? 8 : 9];
let allSubViews = NSBundle.mainBundle().loadNibNamed("LICustomUI", owner: nil, options: nil)
var cell:LIInsuranceNameTableViewCell = allSubViews[11] as! LIInsuranceNameTableViewCell
cell.insuranceName.text = "Hello"
println(cell.insuranceName)
cell.insuranceName.backgroundColor = UIColor.redColor();
// cell.backgroundColor = UIColor.redColor();
return cell
}
результат журнала println()
является:
<UILabel: 0x7ad71930; frame = (0 11; 320 21); text = 'Hello'; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; layer = <_UILabelLayer: 0x7ad71a10>>
, но в устройство (эмулятор) текст не изменяется!
какой текст вы видите на устройстве? –