Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的窗口上有一个 NSTextView 对象。我将 NSStrings 传递给它并显示。我想更改显示的单词的大小。我怎么做?我是在检查器中执行此操作还是有办法在代码中执行此操作?请举个例子。谢谢!
NSTextField派生自NSControl它公开一个font属性(参考):
NSTextField
NSControl
font
textField.font = [NSFont fontWithName:@"Something" size:12.0];