我想知道如何在swift中将标题颜色更改为NSButton,我在objective-c中见过很多示例,但我认为在swift中的实现是不同的,有人能给我提供一个示例吗?
发布于 2017-06-13 10:14:25
在Swift4中
button.attributedTitle = NSMutableAttributedString(string: "Hello World", attributes: [NSAttributedStringKey.foregroundColor: NSColor.white, NSAttributedStringKey.paragraphStyle: style, NSAttributedStringKey.font: NSFont.systemFont(ofSize: 18)])https://stackoverflow.com/questions/27875813
复制相似问题