[[RKObjectManager sharedManager] loadObjectsAtResourcePath:@"app/site_pattern" usingBlock:^(RKObjectLoader* loader) {
[loader setObjectMapping:clientMappring];
loader.delegate = self;
shopLoader = loader;
}];
上面,我使用block函数在我的应用程序中加载了一些数据,但是当我弹出这个viewcontroller时,我不知道何时以及如何取消这个请求。
任何的想法?
- (void)showSelectShop
{
SelectShopViewController * selectShopViewController = [[SelectShopViewController alloc] initWithNibName:@"SelectShopViewController" bundle:nil];
[self.navigationController pushViewController:selectShopViewController animated:YES];
}
更多的:
我尝试在 viewDidUnload 中取消它
- (void)viewDidUnload
{
[super viewDidUnload];
[shopLoader cancel];
}
但它没有用。我仍然收到错误。