TableView的cell中放入文本框是怎么做的
1个回答
展开全部
已经解决 ,非常感谢楼上帮助
CGRect labelRect = CGRectMake(100, 5.0, 50, 50);
UILabel *label = [[UILabel alloc] initWithFrame:labelRect];
label.text = @"名称:";
label.backgroundColor=[UIColor clearColor];
[cell addSubview:label];
CGRect labelRect2 = CGRectMake(180, 5.0, 100, 50);
UITextField *text1 = [[UITextField alloc] initWithFrame:labelRect2];
text1.backgroundColor=[UIColor grayColor];
text1.placeholder =@"输入订单号";
text1.clearButtonMode = UITextFieldViewModeAlways;
text1.adjustsFontSizeToFitWidth = YES;
[cell addSubview:text1];
CGRect labelRect = CGRectMake(100, 5.0, 50, 50);
UILabel *label = [[UILabel alloc] initWithFrame:labelRect];
label.text = @"名称:";
label.backgroundColor=[UIColor clearColor];
[cell addSubview:label];
CGRect labelRect2 = CGRectMake(180, 5.0, 100, 50);
UITextField *text1 = [[UITextField alloc] initWithFrame:labelRect2];
text1.backgroundColor=[UIColor grayColor];
text1.placeholder =@"输入订单号";
text1.clearButtonMode = UITextFieldViewModeAlways;
text1.adjustsFontSizeToFitWidth = YES;
[cell addSubview:text1];
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询