NSURL not instantiating properly
- by taokakao
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?