开发者

iPhone - How to find NSURLConnection started or not?

开发者 https://www.devze.com 2023-01-31 05:39 出处:网络
There\'s a delegate in NSURLConnection \"- (void)connectionDidFinishLoading:(NSURLConnection *)connection\"开发者_开发问答

There's a delegate in NSURLConnection "- (void)connectionDidFinishLoading:(NSURLConnection *)connection"开发者_开发问答

This will be called when the connection finishes. But is there any delegate or way to know when the connection has started.


What you're looking for is the NSURLConnection delegate method connection:willSendRequest:redirectResponse:. It will be called once when the connection starts, but be warned that it will be called again for every redirect response (if there are any).


- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response

can be used.

0

精彩评论

暂无评论...
验证码 换一张
取 消