Property title Copy attribute does not match property inherited from MKAnnotation

Go To StackoverFlow.com

6

These are the lines that are invoking a warning: @property (nonatomic, retain) NSString *Title; @property (nonatomic, retain) NSString *Subtitle;

My Warning is:property 'title' 'copy' attribute does not match the property inherited from 'MKAnnotation'

Any ideas?

Thanks in advance!

#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>



@interface MapAnnotation : NSObject <MKAnnotation> {
    CLLocationCoordinate2D coordinate;
    NSString *title;
    NSString *subtitle;
    int listIndex;
}

@property (nonatomic) CLLocationCoordinate2D coordinate;
@property (nonatomic, retain) NSString *Title; 
@property (nonatomic, retain) NSString *Subtitle; 
@property (nonatomic) int listIndex;

@end
2012-04-03 22:57
by Cherrie Wilson
possible duplicate of Why after upgrading to Xcode 4.2 does MKAnnotation display a warningMidhun MP 2013-03-14 05:44


28

Change:

@property (nonatomic, retain) NSString *Title;

into:

@property (nonatomic, copy) NSString *title;

2012-05-01 13:17
by Roland Keesom
This answer should be accepted, it's correct - ashack 2014-04-16 22:13
Ads