2010-12-18 41 views
0

从NSURLConnection * theConnection对象获取url的方法是什么?帮我关于如何创建url字符串

我的意思是我要检查类似下面

//确实收到响应 - (无效)连接:(NSURLConnection的*)连接didReceiveResponse :(NSURLResponse *)响应 // ----- -------------------------------------------------- ------------------------------------------- {if(connection == @ “http://google.com”) {}其他 {}

}

是否有可能......请帮我解决

回答

1

老兄url没有存储在连接中,它存储在NSURLResponse对象中。

if (response.url isEqual: ...) // you can get what you want here, the return value is a (NSURL *)