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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:28:26+00:00 2026-05-26T15:28:26+00:00

Hi i am working on iOS SDK5 with xcode 4.2 and i want to

  • 0

Hi i am working on iOS SDK5 with xcode 4.2 and i want to prepare a build which should be compatible with iOS 4.0 to 5.0 or at least 4.3 and 5.0

I have set the base sdk to 5.0 and deployment target to 4.0 but when i run the app in the iPhone 4 simulator my application crashes basically due to the code written below

[testNavigationBar setBackgroundImage:[UIImage imageNamed:@"facebook-navbar.png"] forBarMetrics:UIBarMetricsDefault];

but the above code runs fine when i switch the iPhone simulator from 4 to 5 also i have tried setBackgroundColor but its not working so kindly help me on this.

  • 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-05-26T15:28:27+00:00Added an answer on May 26, 2026 at 3:28 pm

    That’s because -setBackgroundImage: was introduced in iOS 5, and Apple don’t (usually) back port new API to older platforms as a rule. Anyway, you have two options:

    if ([testNavigationBar respondsToSelector:@selector(setBackgroundImage:)]) {
      // do what you're currently trying
    }
    else {
      //find a compatible way to do it
    }
    

    or:

    //find a compatible way to do it
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have added custom Badge on UISegmentControl. In Xcode 4.0.2 SDK 4.3 its working
I`m working with iOS SDK If I have NSString *str = @Something cool; NSLog(@Text
I'm working on iOS application in which i want XML file to be the
I'm working on an iOS web app and I have the viewport set to
I'm working on an iOS app where I want to load one view if
I have recently started working in iOS Development, I have noticed the app size
I am working in iOS 5,and before loading my application,I want to open a
I have a code that was working until iOS 4.3.5, now in iOS 5
I'm working with iOS 5 and have dynamically generated cells in a table (2
I have been using the MGTwitterEngine and it is working fine on IOS 4.x,

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.