在Xcode 5的AFNetworking 2.x版本中,我不断收到有关此方法的警告。
AFHTTPRequestOperation *operation = [[[self class] allocWithZone:zone] initWithRequest:self.request];
self.request
是不兼容的指针类型,将'NSURLRequest *'
发送到类型为'MKLocalSearchRequest *'
的参数。
#pragma mark - NSCopying
- (id)copyWithZone:(NSZone *)zone {
AFHTTPRequestOperation *operation = [[[self class] allocWithZone:zone] initWithRequest:self.request];
operation.responseSerializer = [self.responseSerializer copyWithZone:zone];
operation.completionQueue = self.completionQueue;
operation.completionGroup = self.completionGroup;
return operation;
}
有人解决了这个问题(警告)吗?