0

Since I've been using XCode 6 I got some new warnings which I don't quite understand:

  • Property type 'UITextView *' is incompatible with type 'NSString *' inherited from 'NSObject'
  • 'copy' attribute on property 'description' does not match the property inherited from 'NSObject'
  • 'atomic' attribute on property 'description' does not match the property inherited from 'NSObject'

Here the line its related to:

@property (nonatomic,retain) IBOutlet UITextView *description; 
2
  • Please show the code that these warning relate to. Commented Dec 4, 2014 at 9:27
  • Sometimes it happens when you try to initialize it in a wrong way. It could happen for you if you are initializing it as a NSString. Commented Dec 4, 2014 at 9:45

1 Answer 1

3

NSObject has a property with the same name, but a different type - NSString, which you are overriding with your own declaration. Change your property name to solve the problem.

Sign up to request clarification or add additional context in comments.

1 Comment

description is the method that is used when you print an object with the %@ format specifier. You don't want to mess with that. You really, really don't want a property named description.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.