Is there a difference between using NSURLConnection with delegate call backs and sendAsynchronousRequest:queue:completionHandler:?

StackOverflow https://stackoverflow.com/questions/12764078

문제

I'd like to understand what the difference is between using –initWithRequest:delegate: with delegate methods and +sendAsynchronousRequest:queue:completionHandler:.

Are there some performance differences based on the number of requests, or any other criteria?

도움이 되었습니까?

해결책

sendAsynchronousRequest:queue:completionHandler is an easier call to make. initWithRequest:delegate gives you more control over things like caching, redirects, downloading large or incremental amounts of data, canceling requests, etc, etc.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top