/// 请求回调 通用处理
- (void)makeCommonResponse:(id)responseObject selector:(SEL)selector {
int code = [response ObjectintForKey:@"status"];
NSString *msg = [response ObjectstringForKey:@"msg"];
if(code ==200) {
IMP imp = [self methodForSelector:selector];
void(*func)(id,SEL,id) = (void*)imp;
func(self, selector, responseObject);
}
}
可以调用传过来的 方法!
网友评论