Skip to content

Instantly share code, notes, and snippets.

View Jusung's full-sized avatar
💭
Good

jusung Kye Jusung

💭
Good
View GitHub Profile
@Jusung
Jusung / NSMenuItemAttributedTitle.m
Created March 12, 2017 16:53
An example of NSMenuItem which has NSAttributed Title.
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];