/SwiftUI-Cookbook-3rd-Edition

Code Repository for SwiftUI cookbook Third Edition, Published by Packt

Primary LanguageSwiftMIT LicenseMIT

SwiftUI Cookbook - Third Edition

SwiftUI Cookbook - Third Edition

This is the code repository for SwiftUI Cookbook - Third Edition , published by Packt.

A guide for building beautiful and interactive SwiftUI apps

What is this book about?

SwiftUI is the modern way to build user interfaces for iOS, macOS, and watchOS. It provides a declarative and intuitive way to create beautiful and interactive user interfaces. The new edition of this comprehensive cookbook includes a fully updated repository for SwiftUI 5, iOS 17, Xcode 15, and Swift 5.9. With this arsenal, it teaches you everything you need to know to build beautiful and interactive user interfaces with SwiftUI 5, from the basics to advanced topics like custom modifiers, animations, and state management.

In this new edition, you will dive into the world of creating powerful data visualizations with a new chapter on Swift Charts and how to seamlessly integrate charts into your SwiftUI apps. Further, you will be able to unleash your creativity with advanced controls, including multi-column tables and two-dimensional layouts. You can explore new modifiers for text, images, and shapes that give you more control over the appearance of your views.

You will learn how to develop apps for multiple platforms, including iOS, macOS, watchOS, and more.

With expert insights, real-world examples, and a recipe-based approach, you’ll be equipped to build remarkable SwiftUI apps that stand out in today’s competitive market.

What you will learn

Create stunning, user-friendly apps for iOS 17, macOS 14, and watchOS 10 with SwiftUI 5 Use the advanced preview capabilities of Xcode 15 Use async/await to write concurrent and responsive code Create powerful data visualizations with Swift Charts Enhance user engagement with modern animations and transitions Implement user authentication using Firebase and Sign in with Apple Learn about advanced topics like custom modifiers, animations, and state management Build multi-platform apps with SwiftUI

Who is this book for

This book is for mobile developers who want to learn SwiftUI as well as experienced iOS developers transitioning from UIKit to SwiftUI. The book assumes knowledge of the Swift programming language and Xcode. You'll also find this book to be a helpful resource if you're looking for reference material regarding the implementation of various features in SwiftUI.

Table of Contents

  1. Using the Basic SwiftUI Views and Controls
  2. Displaying Scrollable Content with Lists and Scroll Views
  3. Exploring Advanced Components
  4. Viewing while Building with SwiftUI Preview in Xcode 15
  5. Creating New Components and Grouping Views with Container Views
  6. Presenting Views Modally
  7. Navigation Containers
  8. Drawing with SwiftUI
  9. Animating with SwiftUI
  10. Driving SwiftUI with Data
  11. Driving SwiftUI with Combine
  12. SwiftUI concurrency with async await
  13. Handling Authentication and Firebase with SwiftUI
  14. Persistence in SwiftUI with Core Data and Swift Data
  15. Data Visualization with Swift Charts
  16. Creating Multiplatform Apps with SwiftUI
  17. SwiftUI Tips and Tricks

If you feel this book is for you, get your copy today on Packt or Amazon!

https://www.packtpub.com/

Instructions and Navigation

All the code is organized in hierarchical folders. Each chapter has a folder and inside the chapter each recipe has its own folder. There is a Resources folder with assets used in some of the recipes.

Software List

With the following software you can run all code files present in the book (Chapter 1-17).

Chapter Software required OS required
01-15, 17 Xcode 15 MacOS 13.5
16 Xcode 15 MacOS 14.0

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Get to Know the Author

Juan C. Catalan is a software engineer with more than 18 years of professional experience. He started mobile development back in the days of iOS 3. Juan has worked as a professional iOS developer in many industries. Industries such as medical devices, financial services, real estate, document management, fleet tracking, and industrial automation. He has contributed to more than 30 published apps in the App Store, some of them with millions of users. Juan gives back to the iOS development community with technical talks, mentoring developers, reviewing technical books and now as a book author. He lives in Austin, Texas, with his wife, Donna, where they spend time with their kids.

Get in touch

Contact the author Feel free to contact the author through LinkedIn. Follow the author on Amazon.

Share your thoughts: Once you’ve read SwiftUI Cookbook, Third Edition, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

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 reported this to us. Please visit http://www.packtpub.com/submit-errata, click Submit Errata, and fill in the form.

Errata

  • Page 25 (Pragraph 3, line 5): the + and : signs should be the + and - signs

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781805121732