Waiting for a block to finish [duplicate]
问题 This question already has answers here : Return value for function inside a block (3 answers) Closed 5 years ago . I have a UITableView and I'm attempting to get the number of rows. However, I'm having trouble using blocks. In the code below I'd just like to return count, but as I now understand blocks are asynchronous. I've looked around trying to find a solution but none of them worked. One solution I tried was this: How do I wait for an asynchronously dispatched block to finish? but when I