1.背景颜色 field.backgoundColor = [UIColor redColor];
2.设置field文字 field.text = @"输入文字";
3.设置field的提示文字 field.placeholder = @"请输入用户名";
4.设置field开始编辑时清除提示内容 field.clearsOnBeginEditing = YES;
5.设置field的文字大小 field.font = [UIFont systemFontOfSize:14];
6.设置文字颜色 field.textColor = [UIColor redColor];
7.设置文字对齐方式 field.alignment = NSTextAlignmentCenter;
8.输入密码安全输入 field.secureTextEntry = YES;
9.弹出键盘样式 field.keyBoardType = UIKeyBoardTypeAlphabet;
10.设置field的键盘外观样式 field.keyBoardAppearance = UIKeyBoardAppearanceDefault;
11.设置输入框的外观 field.borderStyle = UITextBorderStyleLine;
时间: 2024-10-12 16:04:27