0
我有下面的代碼,由於某種原因我的塊沒有被解僱。Block not fired
int main (int argc, const char * argv[])
{
@autoreleasepool {
return 0;
HttpRequestHelper *requestHelper = [[HttpRequestHelper alloc] init];
[requestHelper processRequest:@"www.yahoo.com" callback:^(NSString * response) {
NSLog(@"%@",response);
}];
}
}
@implementation HttpRequestHelper
-(void) processRequest:(NSString *)url callback:(void (^)(NSString *))block
{
block(url);
}
啊,甚至沒有注意到開始時的回報。謝謝! – azamsharp 2012-04-29 02:35:04