Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
iOS 12 Programming for Beginners

You're reading from   iOS 12 Programming for Beginners An introductory guide to iOS app development with Swift 4.2 and Xcode 10

Arrow left icon
Product type Paperback
Published in Dec 2018
Publisher Packt
ISBN-13 9781789348668
Length 692 pages
Edition 3rd 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 (27) Chapters Close

Preface 1. Getting Familiar with Xcode 2. Building a Foundation with Swift FREE CHAPTER 3. Building on the Swift Foundation 4. Digging Deeper 5. Digging into Collections 6. Starting the UI Setup 7. Setting Up the Basic Structure 8. Building Our App Structure in Storyboard 9. Finishing Up Our App Structure in Storyboard 10. Designing Cells 11. Getting Started with the Grid 12. Getting Data into Our Grid 13. Getting Started with the List 14. Where Are We? 15. Working with an API 16. Displaying Data in Restaurant Detail 17. Foodie Reviews 18. Working with Photo Filters 19. Understanding Core Data 20. Saving Reviews 21. Universal 22. iMessages 23. Notifications 24. SiriKit 25. Beta and Store Submission 26. Other Books You May Enjoy

Creating a data model

The data model is where you create your app's model objects and their properties. For our project, we only need to create one model object, called Review. Let's create a managed object model now:

  1. In the Navigator panel, right-click on the Misc folder and create a new group, called Core Data.
  2. Next, right-click this new Core Data folder and click New File.
  3. Inside the Choose a template for your new file screen, select iOS at the top and then scroll down to the Core Data section. From there, select Data Model. Then, hit Next:
  1. Name the file LetsEatModel and click Create.
  2. Click Add Entity in the screen that appears:

Then, in the bottom-right corner of the new screen, change the Editor Style to Graph Style:

In the Graph Style, double-click on Entity in the box in the middle of the graph to change your entity's name:

  1. Update the text to say...
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 €18.99/month. Cancel anytime