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

  • Home
  • SEARCH
  • 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 8505091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:13:16+00:00 2026-06-11T02:13:16+00:00

i have a tabbed application with 4 navControllers, which all should use the SAME

  • 0

i have a tabbed application with 4 navControllers, which all should use the SAME UINavigationBar (same color, same buttons). now i only want to create the navbar once!

my first approach was to subclass UINavigationController, change the bar color and buttons, and use it for the navControllers in my AppDelegate, but the buttons didn’t show up and i found out that the documentation says that you’re not supposed to subclass UINavigationController…

can you help me out? i coulnd’t find a solution to this anywhere…

  • 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-11T02:13:17+00:00Added an answer on June 11, 2026 at 2:13 am

    If you’re targeting iOS 5 only you may use the appearance proxy, which lets you customize UI elements at one point for the whole application.

    http://developer.apple.com/library/ios/#documentation/uikit/reference/UIAppearance_Protocol/Reference/Reference.html

    If you need to do this on older iOS’ then there is no really nice solution to do this. There is an approach which uses method swizzling, described here.

    http://samsoff.es/posts/customize-uikit-with-method-swizzling

    But this does not work on iOS 5 anymore. Best approach is to use the appearance proxy for iOS 5 and a workaround like the method swizzling for older iOSes.

    Edit:

    Here’s some code I found to use the appearance proxy if it’s available and use method swizzling if it’s not.

    if ([[UINavigationBar class] respondsToSelector:@selector(appearance)]) {
        // iOS >= 5.0 -> Use Appearance API
        [[UINavigationBar appearance] setTintColor:[UIColor redColor]];
    }
    else {
        // iOS < 5.0 -> Use Method Swizzling
        Method drawRectCustomBackground = class_getInstanceMethod([UINavigationBar class], @selector(drawRectCustomBackground:));
        Method drawRect = class_getInstanceMethod([UINavigationBar class], @selector(drawRect:));
        method_exchangeImplementations(drawRect, drawRectCustomBackground);
    }
    

    The drawRectCustomBackground method is implemented in a category on UINavigationBar.

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

Sidebar

Related Questions

I have an application which I am developing using WPF\Prism\MVVM. All is going well
I am working on xcode4.3.2 and I have created tabbed Application 7 now i
I've tabbed application with storyboard . I want to have adwhirl below my tabbar.
I created a tabbed application in which I have three tabs. In the first
I have a tabbed application where I want the user to be able to
I have tabbed iOS application. I need to know which tab is active and
I currently have developed a Tabbed Based Application. The first Tab is decors which
I have the following problem. I have a tabbed application implemented using a ViewPager.
I have an iOS 5 Tabbed Application, using Storyboards. My Tabbar Controller points to
Possible Duplicate: Xcode: Storyboard Tabbed Application Passing Data Back and Forth Basically I have

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.