У меня есть UITableViewCell, который имеет TextLabel и UITextField прикрепленное как подвид, как это:Установка ширины TextLabel в UITableViewCell
cell = [tableView dequeueReusableCellWithIdentifier:Value1CellIdentifier];
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:Value1CellIdentifier] autorelease];
cell.accessoryType = UITableViewCellAccessoryNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.textLabel.text = @"Name";
UITextField *playerTextField = [[UITextField alloc] initWithFrame:CGRectMake(110, 10, 185, 30)];
playerTextField.adjustsFontSizeToFitWidth = YES;
playerTextField.textColor = [UIColor blackColor];
playerTextField.placeholder = @"John Doe";
playerTextField.textAlignment = UITextAlignmentLeft;
[playerTextField setEnabled: YES];
[cell addSubview:playerTextField];
[playerTextField release];
TextLabel берет на дорогу много места. Как я могу установить ширину textLabel, так что остальная часть UITableViewCell получит ширину напоминания?
Спасибо
Ну на самом деле я могу просто установить позицию мой добавленный subview к более «левому», и он работает :) – Neigaard
Цифры. Тогда зачем беспокоиться? :) –