Browsing articles tagged with " UIImage"

How to Load a UIImage From a URL

Dec 5, 2009   //   by Derek van Vliet   //   Development  //  1 Comment

Early on in development of Addicus, we discovered how easy it was to load images from the web. This was a huge boon to us since it meant our artists could modify assets on our server and they would update live in the test builds, without having to make a new build.

This all hinged on the ability to load a UIImage from a URL. And as it happens, this can be accomplished in as little as one line of code:

UIImage * img = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@""]]];

This eventually led to us writing a resource manager singleton class that handles all of our resource loading and can be toggled between local and web mode.

Our Games

Latest Tweets