objective-cnstextfieldnstextfieldcell

How to make NSTextField use custom subclass of NSTextFieldCell?


I've been looking for a solution to make my NSTextField bottom-aligned and I've found this and adjusted it for my needs. So now I have this custom NSTextFieldCell but how do I tell my NSTextFields to use this class (programmatically)?


Solution

  • Have you tried setCell: method of the NSControl class?

    - (void)setCell:(NSCell *)aCell