I'm attempting to follow the post linked below to override the NSCell of a NSTextField but it looks like the setCellClass
method is now deprecated in OSX 10.10.
How to make NSTextField use custom subclass of NSTextFieldCell?
How should one override the NSTextField's cell substituting it for a subclass?
The reason for doing this is to vertically centre the text of a NSTextField cell which Apple have made very difficult.
public override class var cellClass: AnyClass? { get { YourCustomCell.self } set {} }
on the NSControl
subclass seems to work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With