ios UI 小属性点

UITextField *tf = [UITextField alloc]initWithFrame:CGRectMake(0,0,30,30)]autorelease];

//键盘选择数字和标点符号键盘

tf.keyboardType = UIKeyboardTypeNumberAndPunctuation;

//添加提示文字

tf.placeholder = @"number";

//字母大小写

tf.autocapitalizationType = UITextAutocapitalzationTypeNone;//首字母不大写

tf.autocapitalizationType = UITextAutocapitalzationTypeAllcharacter;//字母全部大写

tf.autocapitalizationType = UITextAutocapitalzationTypeSentences;//句子开头字母大写

tf.autocapitalizationType = UITextAutocapitalzationTypewords;//每个单词首字母大写

//自动纠错与否

tf.autocorrectionType = UITextAutocorrectionTypeNo;//不自动纠错


你可能感兴趣的:(ios UI 小属性点)