How to do it...

  1. Create a new Xcode project with the Single View Application template with the name FoodIndex.
  2. Click on the initial view controller and embed it in Navigation Controller by clicking on Editor | Embed In | Navigation Controller.
  3. Change the title of the navigation bar to Nutritions.
  1. Drag a UITableView, and add it as a subview, and make it cover the screen. The constraints of the table view will look like this:
      tableview.trailing = superview.trailing 
      tableview.leading = superview.leading = 
      tableview.trailing = superview.trailing 
  1. Then, drag a UITableViewCell to the table view. Open the Attributes Inspector tab and change the Style to Subtitle and the Identifier to cell.
  2. Right-click on the table ...

Get iOS Programming Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.