在tableview里添加UItextfield

CGRect frame = CGRectMake(cell.frame.origin.x, cell.frame.origin.y, self.view.bounds.size.width, 44);

 
   textFieldFunction = [[UITextField alloc] initWithFrame:frame];
 

   textFieldFunction.borderStyle = UITextBorderStyleBezel;
 
   textFieldFunction.textColor = [UIColor blackColor];
 
   textFieldFunction.font = [UIFont systemFontOfSize:15.0];
 
   textFieldFunction.placeholder = @"請選擇職能";
 
   textFieldFunction.backgroundColor = [UIColor whiteColor];
 
   textFieldFunction.tag = 4;  // tag this control so we can remove it later for recycled cells

   textFieldFunction.enabled = NO;

   [cell addSubview:textFieldFunction];

posted on 2010-05-26 10:14  fairycao  阅读(490)  评论(0编辑  收藏  举报