0xS*_*ina 1 cocoa-touch objective-c ios automatic-ref-counting
我有个街区;
typedef void (^SIResponseHandler) (id obj, NSString *error);
Run Code Online (Sandbox Code Playgroud)
和方法:
+ (void)uploadPhoto:(UIImage *)photo
toPathForComponents:(NSArray *)components
completionHandler:(SIResponseHandler)responseHandler;
Run Code Online (Sandbox Code Playgroud)
和另一种调用上述方法的方法:
+ (void)updateProfilePhoto:(UIImage *)photo handler:(SIResponseHandler *)handler {
NSArray *components = @[@"users", sharedInstance.username, @"profile", @"photo", @"upload"];
[SIRequest uploadPhoto:photo
toPathForComponents:components
progressHandler:nil
completionHandler:handler];
}
Run Code Online (Sandbox Code Playgroud)
在最后一行,我收到此错误:
Sending '__autoreleasing SIResponseHandler *' (aka 'void (^__autoreleasing *)(__strong id, NSString *__strong)') to parameter of incompatible type 'SIResponseHandler' (aka 'void (^)(__strong id, NSString *__strong)')
Run Code Online (Sandbox Code Playgroud)
我不知道这是什么意思.有人可以解释一下发生了什么吗?谢谢
| 归档时间: |
|
| 查看次数: |
1565 次 |
| 最近记录: |