Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经建立了与服务器的连接,现在我想将图像传输到 iPhone。最好的方法是什么?我在这里检查过,我没有看到除了 xml 之外的任何传输方式。我需要图像。谢谢你!
这是将图像从网络传输到 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 ];