defaultTextAttributes 是一个字典类型
用来设置textfield的内容的属性
比如输入文字的间距 字体 斜体,段落等属性
NSDictionary *attrsDictionary =@{
NSFontAttributeName: [UIFont boldSystemFontOfSize:25],
NSParagraphStyleAttributeName:style, NSForegroundColorAttributeName:[UIColor redColor], NSKernAttributeName:[NSNumber numberWithFloat:5.0f],//这里修改字符间距
};
self.textfield.defaultTextAttributes =attrsDictionary;