Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Property title Copy attribute does not match property inherited from MKAnnotation

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
like image 420
Cherrie Wilson Avatar asked Apr 03 '12 22:04

Cherrie Wilson


1 Answers

Change:

@property (nonatomic, retain) NSString *Title;

into:

@property (nonatomic, copy) NSString *title;

like image 69
Roland Keesom Avatar answered Oct 11 '22 19:10

Roland Keesom