Good pattern for Internet requests with Grand Central Dispatch?

前端 未结 4 1268
醉梦人生
醉梦人生 2021-02-04 11:54

I\'m currently using synchronous ASIHTTPRequest with GCD queues to download data from the Internet, then parse the response data with JSONKit. What do you think about this patte

4条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-04 12:23

    Best way to do it is to use gcd when getting the callback and not when initiating the request. Then you could parse on background thread and notifiy on main thread. Good luck!

提交回复
热议问题