Skip to content
All gists
Back to GitHub
Sign in
Sign up
Sign in
Sign up
{{ message }}
Instantly share code, notes, and snippets.
💭
Good
jusung Kye
Jusung
💭
Good
11
followers
·
25
following
View GitHub Profile
Sort:
Least recently updated
Sort options
Recently created
Least recently created
Recently updated
Least recently updated
All gists
1
Starred
1
Sort:
Least recently updated
Sort options
Recently created
Least recently created
Recently updated
Least recently updated
1 file
0 forks
0 comments
0 stars
Jusung
/
NSMenuItemAttributedTitle.m
Created
March 12, 2017 16:53
An example of NSMenuItem which has NSAttributed Title.
View
NSMenuItemAttributedTitle.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
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.
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.