Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Good

jusung Kye Jusung

💭
Good
View GitHub Profile
@Jusung
Jusung / NSMenuItemAttributedTitle.m
Created Mar 12, 2017
An example of NSMenuItem which has NSAttributed Title.
View NSMenuItemAttributedTitle.m
NSMenuItem *menuItem = [[NSMenuItem alloc] initWithTitle:@"Avenir Next" action:nil keyEquivalent:@""];
NSDictionary *attributes = @{ NSFontAttributeName: [NSFont fontWithName:@"Avenir Next" size:13.0] };
NSAttributedString *attributedTitle = [[NSAttributedString alloc] initWithString:[menuItem title] attributes:attributes];
[menuItem setAttributedTitle:attributedTitle];
You can’t perform that action at this time.