SwiftUI Cookbook - Second Edition: A guide to solving the most common problems and learning best practices while building SwiftUI apps
暫譯: SwiftUI 食譜 - 第二版:解決最常見問題及學習最佳實踐的指南,幫助構建 SwiftUI 應用程式

Giordano Scalzo , Edgar Nzokwe

買這商品的人也買了...

相關主題

商品描述

Key Features

  • Apply the declarative programming paradigm to build cross-platform UIs for Apple devices
  • Learn to integrate UIkit, Core Data, Firebase, and Sign in with Apple with SwiftUI
  • Adopt the new SwiftUI 3.0 features to build visually appealing UIs speedily

Book Description

SwiftUI provides an innovative and simple way to build beautiful user interfaces (UIs) for all Apple platforms, from iOS and macOS through to watchOS and tvOS, using the Swift programming language. In this recipe-based cookbook, you'll cover the foundations of SwiftUI as well as the new SwiftUI 3 features introduced in iOS 15 and explore a range of essential techniques and concepts that will help you through the development process.

The cookbook begins by explaining how to use basic SwiftUI components. Once you've learned the core concepts of UI development, such as Views, Controls, Lists, and ScrollViews, using practical implementations in Swift, you'll advance to adding useful features to SwiftUI using drawings, built-in shapes, animations, and transitions. You'll understand how to integrate SwiftUI with exciting new components in the Apple development ecosystem, such as Combine for managing events and Core Data for managing app data. Finally, you'll write iOS, macOS, and watchOS apps by sharing the same SwiftUI codebase.

By the end of this SwiftUI book, you'll have discovered a range of simple, direct solutions to common problems encountered when building SwiftUI apps.

What you will learn

  • Explore various layout presentations in SwiftUI such as HStack, VStack, LazyHStack, and LazyVGrid
  • Create widgets to quickly display relevant content at glance
  • Get up to speed with drawings in SwiftUI using built-in shapes, custom paths, and polygons
  • Discover modern animation and transition techniques in SwiftUI
  • Add user authentication using Firebase and Sign in with Apple
  • Manage concurrency with Combine and async/await in SwiftUI
  • Solve the most common SwiftUI problems, such as integrating a MapKit map, unit testing, snapshot testing, and previewing layouts

Who this book is 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. Knowledge of object-oriented design and data structures will be useful but not necessary. 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.

商品描述(中文翻譯)

**主要特點**

- 應用宣告式編程範式來為 Apple 設備構建跨平台的用戶界面 (UI)
- 學習如何使用 SwiftUI 整合 UIkit、Core Data、Firebase 和 Apple 登入
- 採用新的 SwiftUI 3.0 特性快速構建視覺吸引人的 UI

**書籍描述**

SwiftUI 提供了一種創新且簡單的方法,使用 Swift 編程語言為所有 Apple 平台(從 iOS 和 macOS 到 watchOS 和 tvOS)構建美麗的用戶界面 (UIs)。在這本基於食譜的烹飪書中,您將涵蓋 SwiftUI 的基礎知識以及在 iOS 15 中引入的新 SwiftUI 3 特性,並探索一系列將幫助您完成開發過程的基本技術和概念。

這本烹飪書首先解釋如何使用基本的 SwiftUI 組件。一旦您學會了 UI 開發的核心概念,例如 Views、Controls、Lists 和 ScrollViews,並使用 Swift 的實際實現,您將進一步學習如何使用繪圖、內建形狀、動畫和過渡來為 SwiftUI 添加有用的功能。您將了解如何將 SwiftUI 與 Apple 開發生態系統中的新組件整合,例如用於管理事件的 Combine 和用於管理應用數據的 Core Data。最後,您將通過共享相同的 SwiftUI 代碼庫來編寫 iOS、macOS 和 watchOS 應用。

在這本 SwiftUI 書的結尾,您將發現一系列簡單、直接的解決方案,以應對構建 SwiftUI 應用時遇到的常見問題。

**您將學到的內容**

- 探索 SwiftUI 中的各種佈局呈現方式,例如 HStack、VStack、LazyHStack 和 LazyVGrid
- 創建小部件以快速顯示相關內容
- 使用內建形狀、自定義路徑和多邊形快速掌握 SwiftUI 中的繪圖
- 發現 SwiftUI 中的現代動畫和過渡技術
- 使用 Firebase 和 Apple 登入添加用戶身份驗證
- 使用 Combine 和 async/await 在 SwiftUI 中管理並發
- 解決最常見的 SwiftUI 問題,例如整合 MapKit 地圖、單元測試、快照測試和預覽佈局

**本書適合誰**

這本書適合希望學習 SwiftUI 的移動開發者,以及從 UIkit 轉向 SwiftUI 的經驗豐富的 iOS 開發者。本書假設讀者具備 Swift 編程語言的知識。對於面向對象設計和數據結構的知識將是有用的,但不是必需的。如果您正在尋找有關 SwiftUI 中各種功能實現的參考資料,這本書也將是您有用的資源。

作者簡介

Giordano Scalzo is a developer with 20 years of programming experience, since the days of ZX Spectrum. He has worked in Swift, Objective-C, C/C++, Java, .Net, Ruby, Python, and in a ton of other languages that he has forgotten the names of. After years of backend development, over the past 10 years, Giordano has developed extensively for iOS, releasing more than 20 apps―apps that he wrote for clients, enterprise applications, or on his own. He is currently a Tech Lead Consultant in London, where he leads mobile digital transformations through his company, Effective Code Ltd. Edgar Nzokwe is a software engineer with 6+ years of experience building web and mobile applications. His areas of expertise include SwiftUI, UIKit, and Kotlin, Python, and a few Javascript frameworks. Edgar is dedicated to advancing the knowledge base of SwiftUI because he believes it empowers developers to design and build dazzling cross-platform apps with minimal development time.

作者簡介(中文翻譯)

Giordano Scalzo 是一位擁有 20 年程式設計經驗的開發者,自 ZX Spectrum 時代以來便開始編程。他曾使用 Swift、Objective-C、C/C++、Java、.Net、Ruby、Python,以及許多他已經忘記名稱的其他語言。在多年後端開發的經歷中,Giordano 在過去 10 年中廣泛開發 iOS 應用程式,發布了超過 20 款應用程式——這些應用程式是他為客戶、企業應用程式或自己編寫的。他目前是倫敦的一名技術領導顧問,通過他的公司 Effective Code Ltd. 領導移動數位轉型。Edgar Nzokwe 是一位擁有 6 年以上經驗的軟體工程師,專注於構建網頁和移動應用程式。他的專業領域包括 SwiftUI、UIKit、Kotlin、Python 以及幾個 JavaScript 框架。Edgar 致力於推進 SwiftUI 的知識基礎,因為他相信這能使開發者以最少的開發時間設計和構建出令人驚豔的跨平台應用程式。

目錄大綱

  1. Using the Basic SwiftUI Views and Controls
  2. Going Beyond the Single Component with Lists and Scroll Views
  3. Exploring Advanced Components
  4. Viewing while Building with SwiftUI Preview
  5. Creating New Components and Grouping Views with Container Views
  6. Presenting Extra Information to the User
  7. Drawing with SwiftUI
  8. Animating with SwiftUI
  9. Driving SwiftUI with Data
  10. Driving SwiftUI with Combine
  11. SwiftUI Concurrency with async await
  12. Handling Authentication and Firebase with SwiftUI
  13. Handling Core Data in SwiftUI
  14. Creating Cross-Platform apps with SwiftUI
  15. SwiftUI Tips and Tricks

目錄大綱(中文翻譯)


  1. Using the Basic SwiftUI Views and Controls

  2. Going Beyond the Single Component with Lists and Scroll Views

  3. Exploring Advanced Components

  4. Viewing while Building with SwiftUI Preview

  5. Creating New Components and Grouping Views with Container Views

  6. Presenting Extra Information to the User

  7. Drawing with SwiftUI

  8. Animating with SwiftUI

  9. Driving SwiftUI with Data

  10. Driving SwiftUI with Combine

  11. SwiftUI Concurrency with async await

  12. Handling Authentication and Firebase with SwiftUI

  13. Handling Core Data in SwiftUI

  14. Creating Cross-Platform apps with SwiftUI

  15. SwiftUI Tips and Tricks