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.top = superview.top 
      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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.