Every application may keep some images in its resources, such as textures or icons. In this recipe, we'll study how one can add an image to resources, load it into the
UIImage object, and then display it on the screen. We will use the
UIImageView component for that purpose, and get familiar with the important Model-View-Controller (MVC) design pattern.
Source code for this recipe is available in the
Recipe02_DisplayingImage folder in the code bundle that accompanies this book. You can also take your own image with the preferred 320 x 480 resolution. Or, you can use the provided
lena.png image, based on the famous picture among computer vision engineers (http://lenna.org). You can use iOS ...