我的故事板上有一个工具栏,想要更改颜色和Delea源。使用下面的代码我adciocei我可以改变颜色,但字体不会改变。怎么了?我的来源应该是“proximaNova-Bold”
- (void)viewDidLoad {
[super viewDidLoad];
[self registerCellNamed:@"DeviceLostHeaderCell"];
[self registerCellNamed:@"DeviceLostDescriptionCell"];
[self registerCellNamed:@"DeviceLostPhotoCell"];
NSDictionary *attributes = @{NSForegroundColorAttributeName : [UIColor colorWithRed:82/255.0 green:157/255.0 blue:230/255.0 alpha:1.0], NSForegroundColorAttributeName : [UIFont fontWithName:@"HelveticaNeue-Bold" size:17.0]};
NSDictionary *attributes2 = @{NSForegroundColorAttributeName : [UIColor redColor], NSForegroundColorAttributeName : [UIFont fontWithName:@"proximaNova-Regular" size:17.0]};
[self.rigthToolbarItem setTitleTextAttributes:attributes
forState:UIControlStateNormal];
[self.leftTollbarItem setTitleTextAttributes:attributes2
forState:UIControlStateNormal];
self.dataTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
这是我的工具栏:
答案 0 :(得分:0)
主要问题是您使用密钥public static void Analyze(string sourceCode)
{
var tree = CSharpSyntaxTree.ParseText(sourceCode);
tree./* ??? What goes here? */
}
并将其设置为字体,而您应该使用NSForegroundColorAttributeName
。
NSFontAttributeName