Preface

SwiftUI Projects is a book that I have been working on since October 2019 and I am excited that you are finally able to read it. I was fortunate enough to be at WWDC when SwiftUI was announced. It was what everyone was talking about the entire week I was there. It is continuing to grow in popularity, so I love the fact that I'm able to bring you a book that will be one of the first of its kind. SwiftUI is so much fun to use and I swear, as soon as I finish with it, I will be finding myself another reason to start a new project.

Who this book is for

SwiftUI Projects is intended for anyone who is already comfortable with Swift. We do not cover Swift topics in detail, so you need to be familiar with these already. All of the SwiftUI topics are taught as if this is the first time you've learned them and will gradually get more difficult.

What this book covers

Chapter 1, SwiftUI Basics, covers the absolute basics of SwiftUI.

Chapter 2, SwiftUI Watch Tour, looks at the basics of SwiftUI, but inside a watch. We will compile some basic charts and graphs to get comfortable.

Chapter 3, NBA Draft – Watch App, explains how to build an NBA Draft app for a watch. We will learn how to take a design and bring it into Xcode, and then we will cover how to make it work with data.

Chapter 4, Car Order Form – Design, covers how to build a custom form design for Tesla for the iPhone.

Chapter 5, Car Order Form – Data, explains how to get the data from our form and send it out using the basics of Combine.

Chapter 6, Financial App – Design, covers how to design a financial app for the iPhone.

Chapter 7, Financial App – Core Data, explains how to integrate Core Data as well as use SwiftUI State for interactions.

Chapter 8, Shoe Point of Sale System – Design, explains how to design and build out a shoe POS system for the iPad.

Chapter 9, Shoe Point of Sale System – CloudKit, integrates CloudKit with our shoe POS system.

Chapter 10, Sports News App – Design, explains how to build out a sports news app design for the iPad and how to work with multiple layouts.

Chapter 11, Sports News App – Data, explains how to get data from an API and integrate it into our sports news app.

To get the most out of this book

Before reading this book, you should already be comfortable with Swift and have a decent understanding. We will not go into any great detail regarding Swift as we will assume that you are already familiar with it. Any new topics will be discussed:

If you do copy and paste code, please understand that this will cause your code to not be formatted and will make it difficult to read. It may also add extra text and/or strange characters that result in errors within your code. As the author of this book, I can advise you that copying and pasting code with which you are unfamiliar is hard and will cause a lot of problems.

If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/SwiftUI-Projects. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781839214660_ColorImages.pdf.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Open the CarInfoBasicView file and update previews with the following previewLayout file."

A block of code is set as follows:

func save() {

let context = persistentContainer.viewContext

if context.hasChanges {

do {

try context.save()

} catch let error {

print(error.localizedDescription)

}

}

Bold: Indicates a new term, an important word, or words that you see on screen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "We are moving to the Complete Order view. This view appears when you tap on the Complete Order button."

Tips or important notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in, and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Reviews

Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!

For more information about Packt, please visit packt.com.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.84.32