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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:33:36+00:00 2026-06-16T07:33:36+00:00

I have been developing apps for a few hours now. I am making a

  • 0

I have been developing apps for a few hours now.

I am making a master-view detail app, from the template. The AppDelegate.m didFinishLaunchingWithOptions allows me to add some custom GUI code to alter things like nav bars and the like. So I went ahead and put a custom background in for the background of the main navigation bars, like this…

//custom navbar
UIImage *navigationBarBackground = [UIImage imageNamed:@"NavigationBarBackground.png"];
[[UINavigationBar appearance] setBackgroundImage:navigationBarBackground forBarMetrics:UIBarMetricsDefault];

Awesome! Now my navigation bars have custom bgs!

Now in the master view area, I have a + button on the top right of the view, which when you click it, opens up a window over the rest of the content, but not a full screen, just a place to input some information, like a form. I created a new class with a .xib. I designed the new window from IB.

But when the new window pops up, the nav bar is not my custom image, it is the default…

So I spent hours trying to find a way to change this also. Finally I came up with adding a custom class to the UIToolbar, by making a new class that would make whatever navBar it was applied to, load a certain image into its background. Great! My .m file for that looks like this:

#import "customToolbar.h" //for your information the .h for this is a blank { }

@implementation customToolbar


- (void)drawRect:(CGRect)rect
{
    CGContextRef c = UIGraphicsGetCurrentContext();
    UIImage *image = [UIImage imageNamed:@"addBusKid-NavBar.png"];
    CGContextDrawImage(c, rect, image.CGImage);
}

@end

So wonderful, with this class, I can apply any bg image to a navigation bar in interface builder.

…

Now, with my nav bars all looking nice, I decided it was time to change some text! So, I started back at my AppDelegate.m

I added some code to change the default text styling of all navigation bar text…

// Customize the title text for *all* UINavigationBars
[[UINavigationBar appearance] setTitleTextAttributes:
 [NSDictionary dictionaryWithObjectsAndKeys:
  [UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0],
  UITextAttributeTextColor,
  [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.8],
  UITextAttributeTextShadowColor,
  [NSValue valueWithUIOffset:UIOffsetMake(0, -1)],
  UITextAttributeTextShadowOffset,
  [UIFont fontWithName:@"Arial-Bold" size:0.0],
  UITextAttributeFont,
  nil]];

Great, this changes my navigation bar text styling…but wait, when I open up that pop up window I made with .xib, just like when I added navigationBar styling in AppDelegate, it did not affect its appearance. So whatever appearance protocols I make, they do not affect my custom classes xibs appearance…

Well I tried to make a custom class just like I did for the navigation bar, that I could apply to give it some style. But I was unable to accomplish this (if you know please tell me)…

And on I went for 3 + hours searching for some way to style the text within this .xib file! Nothing I put in AppDelegate touches it!

So, having explained myself thoroughly to you. My question is thus:

How do I style UIBarButton text that is created in interface builder.

Whether you know of a custom class I could write, that I could then apply to the object as I did the navigation bar for this, or there is some way to add this .xibs UI elements to be stylized according to what I declare in AppDelegate. Please advise me. I have done my homework.

By the way, this is my first post! I feel at home already! Thanks for your support, I hope I can likewise be of help to others.

  • 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-16T07:33:37+00:00Added an answer on June 16, 2026 at 7:33 am

    Just create a @property in your .xib’s (view controller) class that declares the UIBarButtonItem as an IBOutlet. Link this (via IB) to your .xib button representation, and then style the UIBarItem (parent class) textAttributes method.

    See this SO question for more info:
    How can i change Font of UIBarButtonItem?

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

Sidebar

Related Questions

i have been developing iPhone apps for a few months now, i have gone
I have been developing apps on Android for a while now. I have the
I have been developing web apps for a while now and for the past
I have been developing a basic app. Now at the deployment stage it has
I had asp.net back ground and now developing apps for Iphone. I have been
I have been using XCode 3.2.4 when started developing iOS apps but now I
I have been developing an app for weeks on a desktop computer. I have
I have been developing in Android for approximately two months now. Yesterday, my eclipse
I have been developing android apps out of hobby and fun. I want to
I have been developing line drawing apps that produce lines such as these: I

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.