Master SwiftUI with hands-on recipes covering layouts, navigation, data flow, SwiftData, networking, charts, and animations. Fully updated for iOS 27 and the new Liquid Glass design.
Key Features:
- Learn SwiftUI through practical recipes that progress from fundamentals to advanced APIs
- Build modern iOS apps with iOS 27 APIs, Liquid Glass, SwiftData, Swift Charts, and networking
- Add on-device Apple Intelligence to your apps, from text and structured data to images
Book Description:
SwiftUI Cookbook is a practical guide to building modern iOS apps with SwiftUI. Fully updated for iOS 27, this edition introduces a beginner-friendly structure while retaining the cookbook approach developers love.
Starting with the fundamentals of SwiftUI, you'll learn how to create responsive layouts, build reusable views, manage navigation flows, and design interactive forms and lists. You'll then master data flow with the Observation framework, persist data with SwiftData, fetch remote content with async/await, and learn to debug, test, and profile your apps.
The book also explores advanced topics such as custom layouts, deep linking, animations, Canvas drawing, Swift Charts, WebView integration, rich text, Liquid Glass visual effects, and on-device Apple Intelligence with Foundation Models and Image Playground. Every recipe is built around a focused, practical sample app, with all the code available for download.
Whether you are new to SwiftUI or an experienced Apple developer, this book will help you build responsive, visually polished, and production-ready apps using the latest tools and frameworks from Apple.
What You Will Learn:
- Build responsive layouts with stacks, grids, and custom layouts
- Manage app state with the Observation framework and bindings
- Persist data with SwiftData, @AppStorage, and local files
- Integrate remote APIs with async/await, Codable, and Combine
- Master navigation, modal sheets, and deep linking
- Create animations, Canvas drawings, and Liquid Glass effects
- Build interactive 2D and 3D charts with Swift Charts
- Add Apple Intelligence features with Foundation Models and Image Playground
- Debug, test, and improve accessibility in SwiftUI apps
Who this book is for:
This book is ideal for data analysts, data scientists, and Python developers who want instantly useful and practical recipes to implement today, and a comprehensive reference book for tomorrow. Basic knowledge of the Python Programming language is a must, while familiarity with statistics will help you get the most out of this book.
Table of Contents
- SwiftUI Essentials
- Lists, Scroll Views, and Search
- Prototyping and Previews
- User Input and View Composition
- State and Data Binding
- App-Wide Settings and Accessibility
- Data Persistence and Local Storage
- Networking and Remote Data
- Debugging, Testing and Performance
- Grids and Layout
- Navigation, Sheets, and Deep Linking
- Drawing, Animations, and Visual Effects
- Swift Charts
- Web Content and Rich Text
- On-Device Intelligence in SwiftUI