【发布时间】:2013-12-17 03:15:46
【问题描述】:
我的导航栏大部分是根据自己的喜好定制的,但我正在尝试使用NSKernAttributeName 来增加字距调整。我正在使用外观代理将导航栏设置为白色文本和自定义字体,但是当我尝试添加字距调整时,它不会生效。
[[UINavigationBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], NSForegroundColorAttributeName,
[UIFont fontWithName:@"HelveticaNeue-Light" size:20.0], NSFontAttributeName,
[NSNumber numberWithFloat:2.0], NSKernAttributeName, nil]];
我是否需要做一些其他事情来为标题标签添加一些不太常见的属性,例如字距调整?
【问题讨论】:
标签: ios objective-c swift user-interface kerning