views:

235

answers:

1

I have setup a connection to a server and now I want to transfer images to the iPhone. What's the best way to do this? I checked here and I don't see a way to transfer anything other than xml. I need images. Thank You!

+4  A: 

Here's an example of transfering images from the web to the iphone:

id path = @"http://a1.twimg.com/profile_images/65821548/summer2007_normal.jpg";
         NSURL *url = [NSURL URLWithString:path];
         NSData *data = [NSData dataWithContentsOfURL:url];
         UIImage *img = [[UIImage alloc] initWithData:data ];
ennuikiller