• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Overriding property attributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Overriding property attributes


  • Subject: Overriding property attributes
  • From: Jonathan Mitchell <email@hidden>
  • Date: Thu, 03 Dec 2015 22:27:59 +0000

Hi

NSObject declares:
@property(readonly, copy) NSString *description

However, on occasion I may require a non atomic variant:
@property (nonatomic, readonly, copy) NSString * description;

My usage case involves using a code generator that outputs property declarations in a standardised way that can cause these attribute clashes and associated warnings:
Two things:

1. What is the best way to deal with this situation? I can disable the warning with a pragma targeting -Wproperty-attribute-mismatch. Is that it?
2. Does the attribute mismatch have the potential to cause any serious issues for ARC?

Thanks

Jonathan














_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Overriding property attributes
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Best Control for a Matrix these days?
  • Next by Date: Re: Overriding property attributes
  • Previous by thread: Re: Best Control for a Matrix these days?
  • Next by thread: Re: Overriding property attributes
  • Index(es):
    • Date
    • Thread