I've had a look at lots of different answers about blocks and I'm still struggling to figure out how to use it.
Here is what I have so far...
@interface myController ()
typedef void (^CompletionBlock)();
@end
Then I have declared a method like this:
-(void)reloadDataWithCompletions:(CompletionBlock)completionBlock{
[self.tableView reloadData];
completionBlock();
}
What I don't know how to do is how to write the code in the completionBlock. Do I write another method called completionBlock ? Like this
-(void) completionBlock{
// do something here once the first method is finished?
}