Skip to content

Instantly share code, notes, and snippets.

@oliverbarreto
Created December 19, 2013 20:20
Show Gist options
  • Select an option

  • Save oliverbarreto/8045581 to your computer and use it in GitHub Desktop.

Select an option

Save oliverbarreto/8045581 to your computer and use it in GitHub Desktop.
Changing the Font of Navigation Bar Title You can customize the text style by using the “titleTextAttributes” properties of the navigation bar. You can specify the font, text color, text shadow color, and text shadow offset for the title in the text attributes dictionary, using the following text attribute keys: UITextAttributeFont – Key to the …
NSShadow *shadow = [[NSShadow alloc] init];
shadow.shadowColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.8];
shadow.shadowOffset = CGSizeMake(0, 1);
[[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:245.0/255.0 alpha:1.0], NSForegroundColorAttributeName,
shadow, NSShadowAttributeName,
[UIFont fontWithName:@"HelveticaNeue-CondensedBlack" size:21.0], NSFontAttributeName, nil]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment