How to make program wait for asynchronous NSURLConnection to finish before proceeding with next command?

后端 未结 6 1781
日久生厌
日久生厌 2021-02-01 09:10

How can I make my program wait for an asynchronous NSURLConnection to finish before going to the next line of code?

SetDelegate *sjd= [SetDelegate alloc];
NSURLC         


        
6条回答
  •  一整个雨季
    2021-02-01 09:30

    NSURLConnection is already asynchronous. Simply implement the delegate methods. If you want to update the UI on the MainThread (e.g. a progress bar), you can do so in didReceiveData. or look at this

提交回复
热议问题