Reputation: 15071
I know three20 has a PhotoViewController but it seems like overkill to just include the whole framework just to load one picture from one URL. Does anyone know of any code/lib that displays one picture when give one URL?
Upvotes: 0
Views: 248
Reputation: 8924
Three20 has a TTImageView which displays an image from a given URL I believe.
Upvotes: 0
Reputation: 243156
You could write your own in about five minutes. You'd need a UIViewController subclass managing a UIImageView. Init the VC subclass with an NSURL, and then download the contents of the NSURL into an NSData object. Use the NSData object to create a new UIImage. Set the image property of the UIImageView to the downloaded image.
After you spend five minutes on that, you could spend another two minutes to make the ViewController interaction-safe by downloading the image on a second thread.
(It took me longer to find all the appropriate links than it'd take to write your own)
Upvotes: 1