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 8577909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:15:58+00:00 2026-06-11T20:15:58+00:00

i have been using what i had thought to be some fairly standard iOS

  • 0

i have been using what i had thought to be some fairly standard iOS 5 code (and which is a 7x accepted answer on stackoverflow) in order to have my UINavigationBar’s title appear with a customized font.]

but i have discovered that when my app built for iOS5 (so that it can run on both iOS5 and iOS6 devices) is run on the iOS6 simulator, it ellipsizes my title.

iOS 4 inch Retina display simulator running iOS 6.0

the following is the same code running on the iOS 5.1 simulator.

iOS 3.5 inch Retinda display simulator running iOS 5.1

for clarity, the following is the pertinent code that’s been working until i tried running on iOS 6.

#define COURIER_FONT_BOLD @"CourierNewPS-BoldMT"

- (UIFont*)navigationBarTitleFontPortrait
{
    if (!_navigationBarTitleFontPortrait)
        _navigationBarTitleFontPortrait = [UIFont fontWithName:COURIER_FONT_BOLD size:24.0];
    return _navigationBarTitleFontPortrait;
}

// …

    if ([[UINavigationBar class] respondsToSelector:@selector(appearance)])
    {
        NSDictionary* attrs = [NSDictionary dictionaryWithObjectsAndKeys:
                                            [UIColor lightGrayColor],
                                                                UITextAttributeTextShadowColor,
                                            [NSValue valueWithUIOffset:UIOffsetMake(1, 0)],
                                                                UITextAttributeTextShadowOffset,
                                            navigationBarTitleFontPortrait,
                                                                UITextAttributeFont,
                                            nil];
        [[UINavigationBar appearance] setTitleTextAttributes:attrs];
    }
  • 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-11T20:15:59+00:00Added an answer on June 11, 2026 at 8:15 pm

    i discovered two solutions to the above problem:

    1. set the title text to something of a different size in the
      .storyboard (in my case, i entered “…”, and then in viewDidLoad,
      call self.navigationItem.title = @"the GRID";

    2. in viewDidLoad, perform [self.navigationController.navigationBar
      setNeedsLayout]
      .

    i prefer the latter because it feels less like a kludge. i am guessing the first solution forces the second to happen, anyway.

    don’t know why this behavior is different between iOS 5 and iOS 6, but this allows it to work in both.

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

Sidebar

Related Questions

I am using Microsoft SQL Server. I have a Table which had been updated
We have a ASP.NET website project. In the past, we had been using asmx
I have been using TortoiseSVN for some time and I really like it. I
I have been using an API to do some work. This is how I
I have been using some Javascript to create a text field once an certain
I have been using Mercurial version control system for some time already and several
i have been asked a question about delegates, and i had some doubts about
I have been using Stanford POS Tagger to tag parts of speech in a
I have been using play 1.2.5rc4 for development of one app and I have
I have been using the storyboard to make an application and currently there are

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.