在Xcode的4.1没有问题,但升级到的Xcode 4.2,我得到以下警告后:为什么升级到的Xcode 4.2并MKAnnotation显示警告
Property 'title' 'copy' attribute does not match the property inherited from 'MKAnnotation'
Property 'subtitle' 'copy' attribute does not match the property inherited from 'MKAnnotation'
我的代码:
@interface MyAnnotation : NSObject <MKAnnotation> {
CLLocationCoordinate2D coordinate;
NSString *subtitle;
NSString *title;
}
@property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
@property (nonatomic, retain) NSString *subtitle;
@property (nonatomic, retain) NSString *title;
-(id)initWithCoordinate:(CLLocationCoordinate2D) coordinate;
@end
这两个属性,是他们真的吗?如果是这样,为什么? – Phlibbo
如果以下答案中的任何一条提出了解决方案,请点击答案旁边的复选标记以接受答案。这将有助于未来用户搜索相同问题的答案。谢谢。 – SnareChops