Skip to content

Instantly share code, notes, and snippets.

@serhatsezer
Created February 10, 2015 20:51
Show Gist options
  • Save serhatsezer/9ba1f1d827f6bba91889 to your computer and use it in GitHub Desktop.
Save serhatsezer/9ba1f1d827f6bba91889 to your computer and use it in GitHub Desktop.
[[TRUNetworkManager sharedInstance].webService getTransaction:self.transactionId completion:^(NSArray *result, BOOL handleError, NSError *error) {
if(!result)
self.collectionData = result[0];
dispatch_async(dispatch_get_main_queue(), ^{
[self.tableView reloadSections:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 4)] withRowAnimation:UITableViewRowAnimationAutomatic];
});
}
// delegate and data source methods
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"%@", self.collectionData); // first time this print null
// if I check like this is not return null value
if(self.collectionData) {
// create cell ...
....
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment