2

有没有办法改变 WKPickerItem 标题的字体大小。如何改变它的标题字体大小。

4

1 回答 1

0

如果它是 WKInterfaceLabel 类类型,您可以导入 UIKit,对其进行子分类,然后在 init 中输入如下内容:

UIFont *font = [UIFont systemFontOfSize:16.0 weight:UIFontWeightUltraLight];
    NSDictionary *attrsDictionary = [NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
    NSAttributedString *attrString = [[NSAttributedString alloc] initWithString:@"Ultra Light Label" attributes:attrsDictionary];
    [self.title setAttributedText:attrString];

但由于标题是 NSString,并且 Watch 0S 2.0 目前处于测试阶段,因此无法更改 WKPickerItem 标题的字体大小。

于 2015-07-31T08:35:18.823 回答