2009-11-10 57 views
0

我想在左侧& uitextfield右侧放置自定义单元格中的标签。如何在uitableview自定义单元格中将文本框对齐到右边

Textfield显示在左侧的右侧。这是我的代码。

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]; 

如何实现[标签:textfield]模式?

回答

0

首先initWithFrame是不推荐使用的方法。你应该使用initWithStyle来代替。看看抛出可用的样式。也许你会发现你需要的东西。