1

I'm implementing a UINavigationBar with some text on it but I want to change the font in the UINavigationBar text any of you knows if is posible to change font in the text programmatically?

I'll really appreciate your help

user2924482
  • 8,380
  • 23
  • 89
  • 173
  • 3
    Possible duplicate of [Ios 7 change navigation bar title font](http://stackoverflow.com/questions/19791762/ios-7-change-navigation-bar-title-font) – Leonardo Oct 28 '15 at 16:27
  • 1
    you can easily find answer for this with little googling!!! It wont take much time as it took for you to post this questionn. – Teja Nandamuri Oct 28 '15 at 16:29

1 Answers1

1

From iOS 7 and later:

 NSShadow* shadow = [NSShadow new];
    shadow.shadowOffset = CGSizeMake(0.0f, 1.0f);
    shadow.shadowColor = [UIColor redColor];
    [[UINavigationBar appearance] setTitleTextAttributes: @{
         NSForegroundColorAttributeName: [UIColor greenColor],
                    NSFontAttributeName: [UIFont fontWithName:@"Helvetica" size:20.0f],
                  NSShadowAttributeName: shadow
                                                          }];
Maulik shah
  • 1,664
  • 1
  • 19
  • 45