Anyoone可以帮助我如何使用添加动作来调用以下方法UIButton.
-(void)navigatePics:(id)sender andIndex:(NSInteger *)index{}
Run Code Online (Sandbox Code Playgroud) 我对这个块有问题.我试图获取块内的数据NSURLSession.
这是我的代码
-(NSDictionary *) RetrieveData{
NSURLSession * session = [NSURLSession sharedSession];
NSURL * url = [NSURL URLWithString: self.getURL];
dataList =[[NSDictionary alloc] init];
NSURLSessionDataTask * dataTask = [session dataTaskWithURL:url completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
self.json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
}];
return self.dataList;
[dataTask resume];
}
Run Code Online (Sandbox Code Playgroud)
是否可以获取块内的数据NSURLSession?