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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:06:58+00:00 2026-06-11T23:06:58+00:00

How can you support features of iOS6 in an app with a Minimal Deployment

  • 0

How can you support features of iOS6 in an app with a Minimal Deployment Target set to iOS 5.0?

For example, if a user has iOS 5 he will see one UIActionSheet, if the user has iOS 6 he will see a different UIActionSheet for iOS 6? How do you do this?
I have Xcode 4.5 and want an app running on iOS 5.

  • 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-11T23:06:59+00:00Added an answer on June 11, 2026 at 11:06 pm

    You should always prefer detecting available methods/feature rather then iOS versions and then assuming a method is available.

    See Apple documentation.

    For example, in iOS 5 to display a modal view controller we would do something like this:

    [self presentModalViewController:viewController animated:YES];
    

    In iOS 6, the presentModalViewController:animated: method of UIViewController is Deprecated, you should use presentViewController:animated:completion: in iOS 6, but how do you know when to use what?

    You could detect iOS version and have an if statement dictate if you use the former or latter but, this is fragile, you’ll make a mistake, maybe a newer OS in the future will have a new way to do this.

    The correct way to handle this is:

    if([self respondsToSelector:@selector(presentViewController:animated:completion:)])
        [self presentViewController:viewController animated:YES completion:^{/* done */}];
    else
        [self presentModalViewController:viewController animated:YES];
    

    You could even argue that you should be more strict and do something like:

    if([self respondsToSelector:@selector(presentViewController:animated:completion:)])
        [self presentViewController:viewController animated:YES completion:^{/* done */}];
    else if([self respondsToSelector:@selector(presentViewController:animated:)])
        [self presentModalViewController:viewController animated:YES];
    else
        NSLog(@"Oooops, what system is this !!! - should never see this !");
    

    I’m unsure about your UIActionSheet example, as far as I’m aware this is the same on iOS 5 and 6. Maybe you are thinking of UIActivityViewController for sharing and you might like to fallback to a UIActionSheet if you’re on iOS 5, so you might to check a class is available, see here how to do so.

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

Sidebar

Related Questions

Can anyone suggest a CMS able to offer the following features: Free/open source Support
An iPad app can support inclusion of launch images in both orientations; presumably, if
Supposedly this release includes 2 features I'm interested in. Enums support Model can be
I can't find anywhere definitively, if you build an app against the iOS 4
How would you design a database to support the following tagging features: items can
As you know, OAuth can support RSA-SHA1 Signature. I have an OAuthSignature interface that
i need to update my application so it can support retina display in New
I am looking for a caching solution for java which can support query cache/indexing.
I am working on a home screen widget. I hope this widget can support
Is there a way I can add support for syncing my program's settings 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.