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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:02:10+00:00 2026-06-08T22:02:10+00:00

I’m creating a Tabbed Application, and I’m having some trouble getting my icons to

  • 0

I’m creating a Tabbed Application, and I’m having some trouble getting my icons to show up on the tabs. I’ve compared my code to a previous example I had worked on out of the book, and it seems to match, but the icons in the new application just show up as blank squares. I’ve tried to include all the relevant code without all the fiddly bits, but if you’d like to see more, just ask, and I’ll edit more in as the need dictates. I’ve already checked that the case is identical on the imageNamed:string and the icon name.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    ... // initializers for ViewControllers 1-3, which are custom viewControllers
        // that have the tab properties set in (void)viewDidLoad
    globalUINavigationController = [[UINavigationController alloc] initWithNibName:
                                @"DemoTabbedFourthViewController" bundle:nil];
    globalUINavigationController.title = NSLocalizedString(@"Fourth", @"Fourth");
    globalUINavigationController.tabBarItem.image = [UIImage imageNamed:@"fourth.png"];

    UIViewController *viewController4 = [[DemoTabbedFourthViewController alloc] 
                    initWithNibName:@"DemoTabbedFourthViewController" bundle:nil];

    [globalUINavigationController pushViewController:viewController4 animated:YES];
    self.tabBarController = [[UITabBarController alloc] init];
    self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2,
                                         viewController3, globalUINavigationController, nil];
    self.window.rootViewController = self.tabBarController;
    [self.window makeKeyAndVisible];
}

I’m using the globalUINavigationController as my example, because if I can get that one working, I should be able to get the others working based on it. If you have any questions or comments about the code, let me know. I’m new to Objective C and iPhone App development, and I’ll take all the help I can get.

  • 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-08T22:02:13+00:00Added an answer on June 8, 2026 at 10:02 pm

    I think the problem is that you initialize the UINavigationController with a nib file. I actually never tried this. You should first initialize the ViewController and than add this to the NavigationController in its init message. Also you have to set the title on the content view controller, not on the navigation controller, as the navigation controller asks its topViewController for the title it should display.

    I haven’t compiled the code below so there might be some missing commas or something like that, but it should give you an idea of what I meant.

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        ... // initializers for ViewControllers 1-3, which are custom viewControllers
            // that have the tab properties set in (void)viewDidLoad
        UIViewController *viewController4 = [[DemoTabbedFourthViewController alloc] 
                    initWithNibName:@"DemoTabbedFourthViewController" bundle:nil];
    
        globalUINavigationController = [[UINavigationController alloc] initWithRootViewController:viewController4];
        globalUINavigationController.tabBarItem.image = [UIImage imageNamed:@"fourth.png"];
    
        [globalUINavigationController pushViewController:viewController4 animated:YES];
        self.tabBarController = [[UITabBarController alloc] init];
        self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2,
                                         viewController3, globalUINavigationController, nil];
        self.window.rootViewController = self.tabBarController;
        [self.window makeKeyAndVisible];
    }
    

    If this doesn’t fix the problem, it might be because your icon files are regular images. Just the alpha channel of the image is used for tab bar items.

    //EDIT: In this case, have a look at this question: UITabBarItem images just appear as a grey block

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.