Loading UIImages from files stored inside a bundle

We’ve learnt before how to make an iOS Assets Bundle. In this mini post… we’ll learn how to learn images, stored in bundles. Okay.. this one is super simple:

[cc lang=”objc”]
UIImage* twitterBtnImage = [UIImage imageNamed:@”SomeResources.bundle/twitter-button.png”];
[/cc]

Of course, you need to have the ‘SomeResources’ bundle in your project. That’s it!

%d