NSURLConnection delegate methods are not called

后端 未结 4 835
借酒劲吻你
借酒劲吻你 2020-12-04 17:51

I am trying to create a simple NSURLConnection to communicate with a server using a GET request. Connection works well, but delegates methods of NSURLConnection are never ca

4条回答
  •  一生所求
    2020-12-04 18:17

    Apart from checking if the request is called from the main thread, you can check if you give back execution time to the system (if you exit "main"). I had some test code that would stay in a loop until the delegate was called : it would never be called, because the system needs to do stuff in order for the delegate to be called, in the main thread.

提交回复
热议问题