NSURL not instantiating properly

Posted by taokakao on Stack Overflow See other posts from Stack Overflow or by taokakao
Published on 2009-11-01T19:26:16Z Indexed on 2010/05/18 8:30 UTC
Read the original article Hit count: 271

Filed under:
|

Hi, I am new to IPhone developing.

I have got very strange issue with NSURL which is driving me crazy. I want to instantiate NSURL object to use it in loading image. But instantiation never happens in proper way. It always says my url in invalid.

Basically I use code like below:

NSString *str = @"http://google.com";
NSURL *url = [NSURL URLWithString:str];

but I also have tried a lot of different modifications (with CFStringRef + CFURLCreateStringByAddingPercentEscapes and so on). All of them are not working for me. In debugger url is set to "Invalid".

What it could be? I don't think this is algorithmic or environment issue. It could be about some settings?

Have anyone any idea of what happens?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about cocoa-touch