Book Image

Application Development in iOS 7

By : Kyle Begeman
Book Image

Application Development in iOS 7

By: Kyle Begeman

Overview of this book

Table of Contents (15 chapters)
Application Development in iOS 7
About the Author
About the Reviewers

Showing the detail view

When selecting one of the food items, the user should be directed to a new view with the capacity to display more details. All of the code to do this will be handled in didSelectRowAtIndexPath.

Before we write the code to push our detail view, we are going to adjust its layout. Switch to Main.storyboard, locate the FoodDetailViewController object, and perform the following steps:

  1. Select one of the image views and size it to fit the entire screen. This will be our background image, so it must be the back layer as well. If needed, use the document outline to arrange the views.

  2. Select the remaining image view and set its size to 200 x 200 square pixels. Position it centered horizontally and towards the top of the screen. This will be the food items' large image.

  3. Next, move the two labels in the view to just below the second image (the food image). Select the first label and open the Attributes Inspector from the Utilities pane. Set the font to Helvetica Neue Thin with a...