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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:05:09+00:00 2026-06-14T00:05:09+00:00

I have a problem regarding incompatibility of ios5 vs ios6 While I was working

  • 0

I have a problem regarding incompatibility of ios5 vs ios6

While I was working on my project with ios5

label.textAlignment = UITextAlignmentCenter;

then updated to ios6

label.textAlignment = NSLineBreakByTruncatingTail;

Once I run my code on the device which ios5 installed, that give me error.

I am about to upload my app to appstore, however I want my app also supports ios5 as well. How I am going to handle both ios5 and ios6!

Thanks in advance!

  • 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-14T00:05:16+00:00Added an answer on June 14, 2026 at 12:05 am

    The acceptable values for NSTextAlignment are:

    • NSTextAlignmentLeft
    • NSTextAlignmentCenter
    • NSTextAlignmentRight
    • NSTextAlignmentJustified
    • NSTextAlignmentNatural

    Of those any of the first three will work equally under iOS 5 and 6.

    NSLineBreakByTruncatingTail isn’t really a valid type of text alignment though it’ll look like NSTextAlignmentNatural at runtime because of the way the C enums line up.

    So you’ll need either to switch to NSTextAlignmentLeft across the board or to do a functionality check. Thankfully the change in text alignment type is in support of the new ability to push attributed strings to UILabel (and elsewhere) so that gives you something to hang off.

    E.g.

    if([label respondsToSelector:@selector(attributedText)])
        label.textAlignment = NSTextAlignmentNatural;
    else
        label.textAlignment = NSTextAlignmentLeft;
    

    Though the else is technically redundant because NSTextAlignmentLeft is the default value.

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

Sidebar

Related Questions

I am working on UISplitview base project.I have one problem regarding UISplitview.I want to
I have a problem regarding the ksoap2. My problem is that the project used
I have a problem regarding the name resolution of a type called Action. While
I have a problem regarding to logback project. My requirement is I have to
I have a problem regarding assign session variable to class variable while initialize the
I have a problem regarding StartUp Url in WPF. I have a LoginView.xaml and
I have a problem regarding the datediff MYSQL function, I can use it and
I have a problem regarding Android App. I have created an application that download
Description: I have a problem regarding DataGridView . I need to show a Client_Name
I have the following code, and i have a problem regarding changing the ringtone

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.