Xcode 5 iOS 7中的自动属性合成警告

rag*_*oat 5 warnings objective-c ios objc-protocol

我在Xcode 5中用iOS 7 SDK发出警告

Auto property synthesis will not synthesize property declared in a protocol
Run Code Online (Sandbox Code Playgroud)

我没有在Xcode 4中使用iOS 6.1 SDK获得此警告.有任何想法吗?

这是我的代码:

List.h

#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
#import <MapKit/MapKit.h>

@interface List : UIViewController <UITableViewDataSource, UITableViewDelegate, UISearchBarDelegate, CLLocationManagerDelegate, MKMapViewDelegate, MKAnnotation>
{
    IBOutlet UITableView *tableView;
    IBOutlet UISearchBar *searchBar;
}

@property (nonatomic, strong) NSArray *annotations;

@end
Run Code Online (Sandbox Code Playgroud)

List.m

#import "List.h"
#import "RSFM.h"
#import "AnnotationDetailView.h"
#import "DTCustomColoredAccessory.h"

@interface List ()

@end

@implementation List
{
    NSMutableArray *title;
    NSMutableArray *subtitle;
    NSMutableArray *displayItems;
    NSMutableDictionary *marketDictionary;
    NSMutableArray *farmMarkets;
    NSArray *keys;
    NSMutableArray *objects;
}
Run Code Online (Sandbox Code Playgroud)

我收到了警告线:

@implementation List
Run Code Online (Sandbox Code Playgroud)

Wai*_*ain 11

您应该收到某种警告,因为MKAnnotation协议包含许多属性,并且协议中定义的属性从未支持自动合成.

从您声称支持的列表中删除此协议,或者实现适当的属性/访问器方法以履行规定的职责.