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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:29:33+00:00 2026-06-10T01:29:33+00:00

Has anyone tried new syntax sugar introduced in Xcode 4.4 (iOS 5.1), like automatically

  • 0

Has anyone tried new syntax sugar introduced in Xcode 4.4 (iOS 5.1), like automatically calls @synthesize or Literal Syntax for NSArray ? They are quite handy.

But I can’t get it right for this one , “use ‘[]’ syntax to access”. I tried following and they did not work. What did I do wrong ? Thanks.

NSArray *tmp = @[@"hello",@"world"];  //This one works fine
NSString *i = tmp[0]; // or tmp[@0];  this one does not work.
  • 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-10T01:29:35+00:00Added an answer on June 10, 2026 at 1:29 am

    You’re using two different features there. Your first line (tmp = @[@"hello",@"world"]) are literals. That should work in Xcode 4.4.

    The second line (i = tmp[0]) needs runtime support (there are a couple of extra methods needed to make it work) and so won’t work in iOS 5 and below. See this answer for more details.

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

Sidebar

Related Questions

Has anyone tried to build an e-commerce site atop MS Dynamics, using the new
The xcode 4 preview just came out today. Has anyone tried it yet? It
Has anyone tried to install the new Windows Phone 7 tools? Mainly, I would
Has anyone tried new CUDA 5.0's command line profiler? In earlier version it worked
I don't know if anyone has tried the all-new PHPStorm 4 , but I've
Has anyone tried using the NHibernate Velocity L2 cache provider against the Azure AppFabric
Has anyone tried to back up a SharePoint web application using forms based authentication
Has anyone tried automatic Java to C++ conversion for speed improvements? Is it a
Has anyone tried out working with the Delete and update command of SPDataSource used
Has anyone tried taking a video from the camera and then using the video

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.