I am creating a Cocoa application and I cannot figure out how to do this.
I want to make an NSTextField with a custom view similar to the one in Wallet:
Wallet screenshot
I figured out how to resize NSTextField, but I don't know how to resize the font and its size. I have subclassed NSTextFieldCell, but this does not work, the font does not change unless I select the system font, and the size only changes the height of the line, but not the height of the characters.
Header file:
Class file:
#import "VLTextFieldCell.h" @implementation VLTextFieldCell - (NSFont *)font { return [NSFont fontWithName:@"Lucida Grande" size:16.0]; } @end
objective-c cocoa nstextfield macos
Fantattitude
source share