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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:57:07+00:00 2026-06-04T14:57:07+00:00

I have an application that enabled that user to switch language at run-time from

  • 0

I have an application that enabled that user to switch language at run-time from app,every thing is OK but when switch to another language load Load localized Xib for this language but without any images inside this Xib.below my code that is used to switch to anther language.

 NSString* str = [[[NSUserDefaults standardUserDefaults]valueForKey:@"AppleLanguages"]      objectAtIndex:0]; 
 NSBundle* bnd = [NSBundle bundleWithPath:[[NSBundle mainBundle]pathForResource:str ofType:@"lproj" ]];



HomeViewController *homeVC = [[HomeViewController alloc] initWithNibName:@"HomeViewController" bundle:bnd];
UINavigationController *localNavigationController = [[UINavigationController alloc] initWithRootViewController:homeVC];
localNavigationController.viewControllers = [NSMutableArray arrayWithObject:homeVC];
localNavigationController.navigationBarHidden = YES;

NSMutableArray *navs = [NSMutableArray arrayWithObject: localNavigationController];

tabBarController.viewControllers = navs;

self.window.rootViewController = tabBarController;

and here is the error occur in Xcode debug

Could not load the "sahdow.png" image referenced from a nib in the bundle with identifier "(null)" 

I am very please to help me to solve this problem it takes from me many hours.

  • 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-04T14:57:08+00:00Added an answer on June 4, 2026 at 2:57 pm

    The way you’re loading your nib is wrong, and it will force you to have the image “sahdow.png” localized too. In fact, if you localize the image, you will see the error go away – but still I would avoid this path.

    iOS automatically handles language changes in its settings and loads the appropriate localized xibs if you have them. I recommend that you avoid explicitely loading localized xibs in your code, and leave that to iOS instead, by instantiating your view controller in the following way:

    HomeViewController *homeVC = [[HomeViewController alloc] initWithNibName:@"HomeViewController" bundle:nil];
    

    Note: For my answer, I’m assuming that “sahdow.png” is somehow referenced in your nib file on purpose. If this is not the case, please look for references of this image in your nib file and remove them.

    PS: I’ve just found another post in which the solution you’re using to load the localized nib is mentioned, and the side effects it has – such as requiring all related images to be localized as well.

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

Sidebar

Related Questions

I have a Windows user control that reads events from the application log of
I have an application that is JMX enabled. It has its own JMX Agent
I have an application that is launched from within a service using a local
I have a C# 4.0 Winform app that I just upgraded from 3.5 to
i have a silverlight application (SL3) that is enabled for use out of the
I have a windows form application that will open other forms, but will only
I have a Silverlight application that needs Drag-And-Drop functionality because I allow the user
We currently have an Java application that can be deployed on clients or run
I have an iOS application that uses GPS for Location Services. A user would
I have an application on google app engine that serves an html file with

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.