Book Image

Learn SwiftUI

By : Chris Barker
Book Image

Learn SwiftUI

By: Chris Barker

Overview of this book

SwiftUI is the new and powerful interface toolkit that lets you design and build iOS, iPadOS, and macOS apps using declarative syntax. It is a powerful way to develop the UI elements of applications, which would normally be tightly coupled to application logic. Learn SwiftUI will get you up to speed with the framework and cross-device UI development in no time. Complete with detailed explanations and practical examples, this easy-to-follow guide will teach you the fundamentals of the SwiftUI toolkit. You'll learn how to build a powerful iOS and iPadOS application that can be reused for deployment on watchOS. As you progress, you'll delve into UI and unit testing in iOS apps, along with learning how to test your SwiftUI code for multiple devices. The book will also show you how to integrate SwiftUI features such as data binding and network requests into your current application logic. By the end of this book, you will have learned how to build a cross-device application using the SwiftUI framework and Swift programming.
Table of Contents (17 chapters)

What this book covers

Chapter 1, Getting Started with SwiftUI, offers an introduction to the Swift programming language and the SwiftUI framework.

Chapter 2, Understanding Declarative Syntax, provides details on declarative syntax and how this works in SwiftUI.

Chapter 3, Building Layout and Structure, discusses the architecture and design patterns that can be used with SwiftUI.

Chapter 4, Creating Your First Application, gives you an introduction to Xcode and shows how to create your very first project.

Chapter 5, Understanding Controls, Views, and Lists, is where we start to build a recipe app, learning about the core components available to us in SwiftUI.

Chapter 6, Working with Navigation in SwiftUI, sees us adding navigation to our recipe app and moving from one view to another.

Chapter 7, Creating a Form with States and Data Binding, covers how to create an input form and teaches you how to use states and binding.

Chapter 8, Networking and Linking to Your Existing App Logic, discusses adding a network layer and calling our app to retrieve data from an external source.

Chapter 9, Maps and Location Services, sees us working with MapKit and Location Services in SwiftUI.

Chapter 10, Updating for iPad with NavigationViewStyle, covers updating our recipe app to support the iPad.

Chapter 11, SwiftUI on watchOS, shows how to add a watchOS companion app to our recipe app.

Chapter 12, SwiftUI versus UIKit, covers comparisons between common UIKit and SwiftUI controls.

Chapter 13, Basic Animation in Views, touches on the basic animations available to us in SwiftUI.

Chapter 14, Animations in Transitions, allows you to learn how transitions work in SwiftUI alongside animations.

Chapter 15, Testing in SwiftUI, covers how to do UI and unit testing in Swift UI and looks at some of the debugging features available in Xcode 11+.