SwiftUI Cookbook (2nd Edition), published by Packt

Overview

SwiftUI Cookbook - Second Edition

SwiftUI Cookbook - Second Edition

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

A guide to solving the most common problems and learning best practices while building SwiftUI apps

What is this book about?

SwiftUI provides an innovative and simple way to build beautiful user interfaces (UIs) for all Apple platforms, right 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.

This book covers the following exciting features: 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

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter01.

The code will look like the following:

struct ContentView: View {
@State var password = "1234"
@State var someText = "initial text"
var body: some View {
...

Following is what you need for this book: 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.

With the following software and hardware list you can run all code files present in the book (Chapter 1-15).

Software and Hardware List

Chapter Software required OS required
01-15 Xcode 13 Mac OS X

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

Related products

Get to Know the Authors

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.

Other books by the authors

Swift by Example

SwiftUI Cookbook

Hands-On Design Patterns with Swift

Swift: Developing iOS Applications

You might also like...
🎲 100% SwiftUI 2.0, classic 2048 game [SwiftUI 2.0, iOS 14.0+, iPadOS 14.0+, macOS 11.0+, Swift 5.3].
🎲 100% SwiftUI 2.0, classic 2048 game [SwiftUI 2.0, iOS 14.0+, iPadOS 14.0+, macOS 11.0+, Swift 5.3].

swiftui-2048 If you like the project, please give it a star ⭐ It will show the creator your appreciation and help others to discover the repo. ✍️ Abou

SwiftUI TextEdit View - A proof-of-concept text edit component in SwiftUI & CoreText.
SwiftUI TextEdit View - A proof-of-concept text edit component in SwiftUI & CoreText.

A proof-of-concept text edit component in SwiftUI & CoreText. No UIKit, No AppKit, no UITextView/NSTextView/UITextField involved.

A simple SwiftUI Application to demonstrate creation of UI using SwiftUI.
A simple SwiftUI Application to demonstrate creation of UI using SwiftUI.

WatchShop_UI A simple SwiftUI Application to demonstrate creation of UI using SwiftUI. How to run the project ? Fork the project. Run the project usin

SwiftUI animated image view that works on iOS and layout just as SwiftUI.Image

SwiftUI.AnimatedImage SwiftUI animated image view that works on iOS and layout just as SwiftUI.Image Screen.Recording.2021-07-31.at.02.18.33.mov Insta

SwiftUI Animation Library. Useful SwiftUI animations including Loading/progress, Looping, On-off, Enter, Exit, Fade, Spin and Background animations that you can directly implement in your next iOS application or project. The library also contains huge examples of spring animations such as Inertial Bounce, Shake, Twirl, Jelly, Jiggle, Rubber Band, Kitchen Sink and Wobble effects. Browse, find and download the animation that fits your needs. Easily show HUDs with SwiftUI! Lightweight SwiftUI wrapper for JGProgressHUD for iOS, tvOS, Catalyst.
Easily show HUDs with SwiftUI! Lightweight SwiftUI wrapper for JGProgressHUD for iOS, tvOS, Catalyst.

JGProgressHUD-SwiftUI This is a lightweight and easy-to-use SwiftUI wrapper for JGProgressHUD, giving you access to the large and proven feature set o

E-commerce app built in SwiftUI. Built in the course SwiftUI Masterclass in Udemy.
E-commerce app built in SwiftUI. Built in the course SwiftUI Masterclass in Udemy.

Touchdown-SwiftUI E-commerce app built in SwiftUI. Built in the course SwiftUI Masterclass in Udemy. Main components and concepts used: @EnvironmentOb

A multiplatform SwiftUI project demonstrating various SwiftUI features.

WikiDemo A multiplatform SwiftUI project demonstrating various SwiftUI features, including creating a master-detail interface. It's a multiplatform ve

SwiftUI Project built using the fundamentals of SwiftUI that I have learned.

GhibliLog About: I wanted to test my ability to create an application with a responsive SwiftUI interface that would format and display data pulled fr

SwiftUI Projects from Udemy SwiftUI Masterclass

SwiftUI Masterclass Repos: AsyncImage (N/A) Fructus (finished): an app for getting information about different fruits. Data comes from json files. Afr

Best architecture for SwiftUI + CombineBest architecture for SwiftUI + Combine

Best architecture for SwiftUI + Combine The content of the presentation: First of the proposed architectures - MVP + C Second of the proposed architec

SwiftUI - iOS notes App that integrates Core Data with SwiftUI App Life Cycle
SwiftUI - iOS notes App that integrates Core Data with SwiftUI App Life Cycle

Devote (Notes App) SwiftUI Masterclass project Integration between Core Data and SwiftUI App Life Cycle Custom Toggle style and checkbox Read, Update

This a simple swiftui app where i used mvvm architecture, coredata swiftui and so on..
This a simple swiftui app where i used mvvm architecture, coredata swiftui and so on..

SwiftUI MVVM COREDATA NOTE APP This a simple swiftui app where i used mvvm architecture, coredata swiftui and so on... #FEATURES SWIFTUI MVVM COREDATA

Todolist-swiftui - An example of using SwiftUI with CoreData

todolist-swiftui An example of using SwiftUI with CoreData Installation Install

Weather-swiftui - An example of using SwiftUI

weather-swiftui An example of using SwiftUI Installation Get openweather api key

Floating-textfield-swiftui - Floating textfield swiftui: Floating field with multiple icons
Floating-textfield-swiftui - Floating textfield swiftui: Floating field with multiple icons

floating_textfield-swiftui Hey, Guys welcome to this tutorial. In this complete

Unit-Converter-SwiftUI - A simple Unit Converter iOS app built in the process of learning SwiftUI
Unit-Converter-SwiftUI - A simple Unit Converter iOS app built in the process of learning SwiftUI

SwiftUI-Unit-Converter A simple Unit Converter iOS app built in the process of l

Challenge-swiftui-space - Project for SwiftUI Dev Sprints on Devpass
Challenge-swiftui-space - Project for SwiftUI Dev Sprints on Devpass

SwiftUI Challenge - Space App 🚀 Neste desafio, desenvolveremos a interface de u

Owner
Packt
Providing books, eBooks, video tutorials, and articles for IT developers, administrators, and users.
Packt
SwiftUIDay49To61 - Includes CoreData, Networking learning and my custom MVVM CoreData implementation from 100 days of SwiftUI

Includes CoreData, Networking learning and my custom MVVM CoreData implementation from 100 days of SwiftUI by "Hacking with Swift"

Vong Nyuk Soon 3 Feb 11, 2022
SwiftUI Apple Developer Tutorial

SwiftUI Apple Developer Tutorial Apple Developer Documentation - SwiftUI Tutorial Chapter 1 SwiftUI Essentials Creating and Combining Views Apple Deve

Hyungyu Kim 4 Feb 16, 2022
A lightweight 3D renderer for SwiftUI.

Prism A lightweight 3D renderer for SwiftUI. Works with any SwiftUI View. Fully interactive and animatable. Compatible with all SwiftUI modifiers. Wil

Andrew Zheng 700 Dec 24, 2022
A simple swift package that provides a Swift Concurrency equivalent to `@Published`.

AsyncValue This is a simple package that provides a convenience property wrapper around AsyncStream that behaves almost identically to @Published. Ins

Brent Mifsud 33 Oct 3, 2022
iOS Programming with Swift - SwiftUI Edition

swiftuilectures SwiftUI Lectures Репозитори, в което се съхряняват лекциите за курса по iOS със SwiftUI. Анкета Моля, попълнете следната анкета. Онлай

null 4 Nov 30, 2022
Lambton College, 2nd Semester Final IOS Project (Star Wars) game

The game we developed for our project of the course advanced iOS application is based on a functioning of a real time shooting game, in which initiall

Suraj Devgan 6 Aug 18, 2022
Shikishi OSS Edition

Shikishi OSS Edition Version 1.0 本オープンソース版にはプロプライエタリ版があり、本オープンソース版とのデュアルライセンス制となっています。本オープンソース版にはGPL v3.0が適用され、プロプライエタリ版には配信場所で示されたライセンスが適用されます。 本オープン

Cii 24 Mar 3, 2022
A small cookbook app created with UIKit using the mealDB API

Your-New-CookBook This is a small cookbook app I created with UIKit using the me

Alex Diaz 2 Jan 19, 2022
SGS Last Punch - SGS 2021 Dev Camp 2nd Team Last Punch

Snack 여러 협업 툴을 사용하면서 새 창을 키거나 알트탭은 그만! Slack과 Notion의 기능을 합친 Snack으로 쾌적한 협업을 경험해

Jihyo Kim 10 Oct 20, 2022
Cookbook app that allows you to read, add and modify your recipes.

What-s-For-Dinner-iOS-App Cookbook app that allows you to read, add and modify your recipes. Features ?? ?? View You can see recipes divided into cate

Katie Saramutina 2 May 18, 2022