Iphone UITextField-堆叠
如何创建像所附图片一样的“堆叠”UITextFieldIphone UITextField-堆叠,iphone,objective-c,interface-builder,Iphone,Objective C,Interface Builder,如何创建像所附图片一样的“堆叠”UITextField 看起来像UITableView,样式设置为“分组” - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITextField *myTxtField = [[UITextField alloc]init]; [TxtUserID setFont:[UIFont fo
看起来像UITableView,样式设置为“分组”
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITextField *myTxtField = [[UITextField alloc]init];
[TxtUserID setFont:[UIFont fontWithName:@"Verdana" size:15]];
[TxtUserID setFrame:CGRectMake(50, 100, 20, 10)];
[TxtUserID setBorderStyle:UITextBorderStyleRoundedRect];
[cell addSubview:myTxtField];
cell.accessoryView = myTxtField;
}
Hope this will help you out