Wait for assetForURL blocks to be completed

前端 未结 5 2085
离开以前
离开以前 2020-12-23 11:57

I would like to wait this code to be executed before to continue but as these blocks are called assynchronously I don\'t know how to do???

NSURL *asseturl;
N         


        
5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-23 12:40

    The easiest thing to do is to move your code to inside (at the end of) the resultBlock or the failureBlock. That way, your code will run in the correct order, and you will also retain asynchronous behaviour.

提交回复
热议问题