试图发送以下消息
- (NSArray *)callSwaggerwithStart:(NSNumber *)start andCount:(NSNumber *)count
{
[api messageWithCompletionBlock:start count:count filter:@"image" completionHandler:^(CustomResponse *output, NSError *error) {
如果(!错误){
return [NSArray arrayWithArray:[[output toDictionary] valueForKey:@"items"]];
} 别的 {
NSLog(@"CallApi 中的错误,%@", &error);
}
}];
返回零;
}
我收到以下错误:
Incompatible block pointer types
Control may reach end of non-void block
该块来自 Api 类,我想创建一个方法,因为它在一个控制器中多次使用。是什么让代码无法返回嵌套的 NSArray 值?