views:

40

answers:

1

I've got some code to load an image from a URL, it seems to work ok. Unless the URL contains curly brackets. This seems like it is a string formatting problem? I can't figure it out.

ex @"http://site/image.png //works

@"http://site/{image}.png //doesn't work

    NSString* mapURL = @"http://site.com/directory/{map}.png";
    NSLog(mapURL);
    NSData* imageData = [[NSData alloc]initWithContentsOfURL:[NSURL URLWithString:mapURL]];

    UIImage* image = [[UIImage alloc] initWithData:imageData];
    [imageView setImage:image];
    [imageData release];
    [image release];

thanks

+1  A: 

i found this helpful

http://simonwoodside.com/weblog/2009/4/22/how_to_really_url_encode/

Aaron Saunders
A small modification and I'm on my way again, thanks
Rick
you are welcome, I spent hours on a similar issue
Aaron Saunders