【问题标题】:Is there a difference between using NSURLConnection with delegate call backs and sendAsynchronousRequest:queue:completionHandler:?使用带有委托回调的 NSURLConnection 和 sendAsynchronousRequest:queue:completionHandler: 之间有区别吗?
【发布时间】:2012-10-06 21:34:11
【问题描述】:

我想了解–initWithRequest:delegate: 与委托方法和+sendAsynchronousRequest:queue:completionHandler: 之间的区别。

是否存在一些基于请求数量或任何其他标准的性能差异?

【问题讨论】:

    标签: ios ios5 nsurlconnection objective-c-blocks nsurlconnectiondelegate


    【解决方案1】:

    sendAsynchronousRequest:queue:completionHandler 是一个更容易拨打的电话。 initWithRequest:delegate 让您可以更好地控制缓存、重定向、下载大量或增量数据、取消请求等。

    【讨论】:

      猜你喜欢
      • 2012-04-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-30
      • 1970-01-01
      相关资源
      最近更新 更多