iOS textfield设置字符间距

添加富文本属性:

NSDictionary *attrsDictionary =@{
                    NSFontAttributeName: self.textField.font,
                    NSKernAttributeName:[NSNumber numberWithFloat:10.0f]//这里修改字符间距
                    };
self.textField.attributedText=[[NSAttributedString alloc]initWithString:text attributes:attrsDictionary];
原文地址:https://www.cnblogs.com/guchunli/p/6590947.html