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

  • Home
  • SEARCH
  • 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 8496889
In Process

The Archive Base Latest Questions

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

To support iOS 4.3 with ARC, I think the proper way is to use

  • 0

To support iOS 4.3 with ARC, I think the proper way is to use assign:

@property (assign, nonatomic) UIView *view;
@property (assign, nonatomic) MYNode *node;

Is that correct? I also see the following in Apple’s doc for Transitioning to ARC:

For declared properties, you should use assign instead of weak; for variables you should use __unsafe_unretained instead of __weak.

However, if I use the current Xcode (4.4.1), changing a Single View app target to 4.3, and Ctrl-drag a UIButton to the .h file to create an outlet, the generated code is:

@property (unsafe_unretained, nonatomic) IBOutlet UIButton *foo;

Why the difference and which one should be used?

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

    According to 4.1.1. Property declarations in the llvm documentation “assign” and “unsafe_unretained” are equivalent in a property declaration:

    • assign implies __unsafe_unretained ownership.
    • …
    • unsafe_unretained implies __unsafe_unretained ownership.

    ADDED: In the clang source code http://clang.llvm.org/doxygen/SemaObjCProperty_8cpp_source.html you find

    00523   // 'unsafe_unretained' is alias for 'assign'.
    00524   if (Attributes & ObjCDeclSpec::DQ_PR_unsafe_unretained)
    00525     PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_assign);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm considering submitting an app that will only support iOS 5. When iOS 4
Is there a shorter way to present a view controller, when wanting to support
I am new to iOS 5, I created in PhoneGap that support for iOS
I'm diving into iOS development and I'm building a simple app that will support
I'm writing app for iOS 4 with ARC. I'm presenting and dismissing modal view
Is there any elegant way to Cut off support for older iOS operating system
What versions of iOS support auto-renewable subscriptions? Can I use it with 3.1.3?
Is it possible to write apps that support iOS 3.x versions using Xcode 4?
I have an iOS app which is using storyboard (and ARC for that matter).
As a beginner of iOS developer. I use ARC in my project. And I

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.