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
SwiftUI Cookbook

You're reading from   SwiftUI Cookbook A guide for building beautiful and interactive SwiftUI apps

Arrow left icon
Product type Paperback
Published in Dec 2023
Publisher Packt
ISBN-13 9781805121732
Length 798 pages
Edition 3rd Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Juan C. Catalan Juan C. Catalan
Author Profile Icon Juan C. Catalan
Juan C. Catalan
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Using the Basic SwiftUI Views and Controls FREE CHAPTER 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 SwiftData 15. Data Visualization with Swift Charts 16. Creating Multiplatform Apps with SwiftUI 17. SwiftUI Tips and Tricks 18. Other Books You May Enjoy
19. Index

What this book covers

Chapter 1, Using the Basic SwiftUI Views and Controls, explains the basic building blocks for creating SwiftUI apps and how to integrate UIKit components in SwiftUI views.

Chapter 2, Displaying Scrollable Content with Lists and Scroll Views, explains how to use using List views and ScrollView containers to display content when it does not fit on a single screen. You’ll also be able to learn about editable and searchable lists.

Chapter 3, Exploring Advanced Components, explains how to use LazyStack and Lazy Grid to improve performance when displaying large datasets. Also, you’ll learn how to programmatically scroll with ScrollViewReader, display hierarchical data in an expanding list, and hide and show content with DisclosureGroup. Finally, you’ll learn how to display glanceable content outside your app using SwiftUI Widgets.

Chapter 4, Viewing while Building with SwiftUI Preview in Xcode 15, explains how to use the preview macro introduced with Swift 5.9 with the powerful live preview in the Xcode 15 canvas.

Chapter 5, Creating New Components and Grouping Views with Container Views, explains how to use Form views for user interaction, Table for multi-column lists, and Grid for powerful two-dimensional layouts.

Chapter 6, Presenting Views Modally, explains how to display custom views for narrow and focused user interaction, using alerts, confirmation dialogs, sheets, popovers, and context menus.

Chapter 7, Navigation Containers, explains how to use NavigationStack for hierarchical, data-driven navigation, NavigationSplitView for multi-column user interfaces, and TabView for navigation among non-hierarchical content.

Chapter 8, Drawing with SwiftUI, explains how to implement drawings in SwiftUI by using built-in shapes and drawing custom paths and polygons.

Chapter 9, Animating with SwiftUI, explains how to implement basic animations, spring animations, implicit and delayed animations, as well as how to combine transitions, create custom transitions, and create asymmetric transitions. Additionally, you’ll also be able to learn how to perform chained animations with PhaseAnimator and full-custom animations with KeyFrameAnimator.

Chapter 10, Driving SwiftUI with Data, explains how to use the SwiftUI binding mechanism to populate and change views when the bounded data changes. At the end of the chapter, you’ll learn about the Observation framework and the Observable macro, introduced with iOS 17.

Chapter 11, Driving SwiftUI with Combine, explains how to integrate Combine to drive the changes of the SwiftUI views. You’ll explore how to validate forms, fetch data asynchronously from the network, and test Combine-based apps.

Chapter 12, SwiftUI Concurrency with async await, explains how to implement Swift concurrency with async await, fetching from a network resource, and creating an infinite scrolling page.

Chapter 13, Handling Authentication and Firebase with SwiftUI, explains how to implement authentication in your app and store app data in a cloud database.

Chapter 14, Persistence in SwiftUI with Core Data and Swift Data, explains how to implement persistence using SwiftUI and Core Data. You’ll learn how to save, delete, and modify objects in a Core Data local database. You’ll also learn how to use Swift Data, the new persistence framework introduced with iOS 17.

Chapter 15, Data Visualization with Swift Charts, explains how to use Swift Charts for data visualization. You’ll learn how to plot different types of charts using a few building blocks and powerful view modifiers. You’ll discover interactive charts and range charts using real-world examples. You’ll also learn how to transform your data to simplify the visualization process.

Chapter 16, Creating Multiplatform Apps with SwiftUI, explains how to create a multiplatform SwiftUI app that works on iOS 17, macOS 14 Sonoma, and watchOS 10.

Chapter 17, SwiftUI Tips and Tricks, covers several tips and tricks of SwiftUI that will help you to solve several common problems, such as testing SwiftUI views, using custom fonts, showing PDF documents, and using Markdown text.

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