Changes

Jump to: navigation, search

Creating a Simple iPhone Table View Application

23 bytes added, 13:46, 25 March 2011
Adding Table View Images and Changing Cell Styles
== Adding Table View Images and Changing Cell Styles ==
<google>IOSBOX</google>
Now that we have created a simple table view example we can look at extending our code to change the cell style. In so doing we will make use of the image and detailed text properties of the cell object to add images and subtitles to each row of the view.
The first step is to add an image to the resources of our project. If you already have an image file that is suitable for this purpose feel free to use it in this example. Alternatively, we can pick up an image from the Mac OS X system on which Xcode is running. To add an image file to the application resources, right click on the Resources entry in the Groups and Files panel of the main Xcode project window. From the resulting menu, select the ''Add -> Existing Files…'' option. In the resulting file selection panel navigate to and select your pre-existing image file. Alternatively, enter apple.png into the search field and press Enter. The apple.png file should appear in the file list from where it can be selected:

Navigation menu