Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
iOS 10 Programming for Beginners

You're reading from   iOS 10 Programming for Beginners Explore the latest iOS 10 and Swift 3 features

Arrow left icon
Product type Paperback
Published in Dec 2016
Publisher Packt
ISBN-13 9781786464507
Length 678 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Craig Clayton Craig Clayton
Author Profile Icon Craig Clayton
Craig Clayton
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Getting Familiar with Xcode 2. Building a Foundation with Swift FREE CHAPTER 3. Digging Deeper 4. Digging into Collections 5. Starting the UI Setup 6. Setting Up UI 7. Getting Started with the Grid 8. Getting Started with the List 9. Working More with Lists 10. Where Are We? 11. Where's My Data? 12. Foodie Reviews 13. Saving Reviews 14. Universal 15. iMessages 16. Notifications 17. Just a Peek 18. Beta and Store Submission Index

Restaurant Listing


Now that we have our Explore listing going to our Restaurant listing, we need to get our Collection View connected to our RestaurantListViewController. The first thing we should do is create a folder inside of the Restaurant folder:

  1. Right-click on the Restaurant folder and create a group called Restaurant List.

  2. Then, right-click on the Restaurant List folder and create two new groups—Controller and View.

  3. Right-click on the Controller and select New File.

  4. Inside of the template screen, select iOS at the top and then Cocoa Touch Class. Then, hit Next.

  5. You will now see an options screen. Add the following:

    New File:

    • Class: RestaurantListViewController

    • Subclass…: UIViewController

    • Also create XIB: Unchecked

    • Language: Swift

  6. After hitting Next, you will be asked to create this file. Select Create, and your file should look like mine:

Let's delete both didReceiveMemoryWarning() and prepare()(which has been commented out) as we do not need them at this time.

Next, we need to drag out a UICollectionView...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image