character-spacing

How to increase the character spacing in UILabel

試著忘記壹切 提交于 2019-12-29 12:12:11
问题 I am creating an app in >=iOS6. And I want to change the character spacing in UILabel. I have added the custom font "FUTURABT HEAVY" in my app but the Character are too close to eachother. I have find the good code here to increase the character spacing. But if i tried to change it than my text became left- align in stead of center. Please help me with this situation. 回答1: You should probably use NSAttributedString with NSKernAttributeName attribute Here is a small example: UILabel *label = [