Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8028803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:14:07+00:00 2026-06-05T00:14:07+00:00

I changed the font of the UINavigationBar title with the following code, in AppDelegate

  • 0

I changed the font of the UINavigationBar title with the following code, in AppDelegate didFinishLaunchingWithOptions:

[[UINavigationBar appearance] setTitleTextAttributes:
  [NSDictionary dictionaryWithObjectsAndKeys: [UIFont fontWithName:@"Arial-BoldMT" size:24.0], UITextAttributeFont, nil]];

In portrait it is ok, but in landscape the font size is too big.
Is there a possibility to change the font size after rotating the device?

I think I could solve this with a custom titleView, but I am wondering if there is another option (without setting the size to a smaller number in portrait/in general 🙂 )?

I am developing for iOS 5.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T00:14:09+00:00Added an answer on June 5, 2026 at 12:14 am

    Set your attributes using one of these two methods in the visible view controller to modify your code depending on what orientation the device is currently in. Your view controllers will need a pointer to the UINavigationController variable.

    Method called right before view rotates:
    - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration

    Method called right after view rotates:

    - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation

    More information on ViewController methods can be found here:

    http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIViewController_Class/Reference/Reference.html

    I would think the easiest way to accomplish this would be an if statement that sets the title attributes to one style if the device is verticle, else set to another because the device is horizontal.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the following code for 1) Display the changed content in DIV
How do I change the font size for the title of the Action bar
In Visual studio 2008 I changed css methods (like font size increase). Which is
I have an NSTextField where the font used can be changed by the user.
I have a drop-down that lists font families. Like Tahoma, Arial, Verdana, etc. I
I'm evaluating the IntelliJ IDE. I changed some of the display/font setting (among other
body{ font-family:Arial,Lucida Grande, Lucida Sans Unicode, Verdana, Helvetica, sans-serif; font-size:12px; } p, h1, form,
On the callout bubble on the iPhone SDK's map, can the font be changed
I have in my CSS: body { font-size: 0.87em; font-family: Calibri, Arial, Georgia, Verdana,
I made a method where all the font's get changed, but the problem is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.