tags:

views:

235

answers:

1

hi. I want to put Label on left & uitextfield on right in my custom cell.

Textfield is displayed on left right now. Here is my code.

cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"Name"] autorelease];
textField = [[UITextField alloc] initWithFrame:cell.frame];
textField.placeholder = @"Name";
textField.bounds = cell.bounds;
textField.borderStyle=
[cell.contentView addSubview:textField];

how to achieve [label : textfield] pattern ?

A: 

first of all initWithFrame is deprecated method. you should use initWithStyle instead. look throw available styles. maybe there you will find exactly what you need.

Morion