有没有办法改变 WKPickerItem 标题的字体大小
Is there any way to change WKPickerItem title's font size
有什么方法可以更改 WKPickerItem 标题的字体 size.How 以更改其标题的字体大小。
如果它是 WKInterfaceLabel class 类型,您可以导入 UIKit,sub-classify 它并在 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标题的字体大小。
有什么方法可以更改 WKPickerItem 标题的字体 size.How 以更改其标题的字体大小。
如果它是 WKInterfaceLabel class 类型,您可以导入 UIKit,sub-classify 它并在 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标题的字体大小。