跳至正文

UITextField

//创建UITextField对象
UITextField * tf=[[UITextField alloc]init];

//设置UITextField的文字颜色
tf.textColor=[UIColor redColor];

//设置UITextField的文本框背景颜色
tf.backgroundColor=[UIColor grayColor];