开发者

iPhone - How to find NSURLConnection started or not?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜