NSTextFieldCell with Multiple Lines
问题 I need to show an NSTextFieldCell with multiple lines with different format on each line. Something like this: Line 1: Title Line 2: Description I subclassed NSTextFieldCell but I don't know how to go on with it. Any ideas? 回答1: First off, you don't have to subclass NSTextFieldCell to achieve this, since, as a subclass of NSCell , NSTextFieldCell inherits -setAttributedStringValue: . The string you provided can be represented as a NSAttributedString . The following code illustrates how you