Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Swift Cookbook

You're reading from   Swift Cookbook Proven recipes for developing robust iOS applications with Swift 5.9

Arrow left icon
Product type Paperback
Published in Jun 2024
Publisher Packt
ISBN-13 9781803239583
Length 422 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Chris Barker Chris Barker
Author Profile Icon Chris Barker
Chris Barker
Daniel Bolella Daniel Bolella
Author Profile Icon Daniel Bolella
Daniel Bolella
Nathan Lawlor Nathan Lawlor
Author Profile Icon Nathan Lawlor
Nathan Lawlor
Keith Moon Keith Moon
Author Profile Icon Keith Moon
Keith Moon
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Chapter 1: Swift Fundamentals 2. Chapter 2: Mastering the Building Blocks FREE CHAPTER 3. Chapter 3: Data Wrangling with Swift 4. Chapter 4: Generics, Operators, and Nested Types 5. Chapter 5: Beyond the Standard Library 6. Chapter 6: Understanding Concurrency in Swift 7. Chapter 7: Building iOS Apps with UIKit 8. Chapter 8: Building iOS Apps with SwiftUI 9. Chapter 9: Getting to Grips with Combine 10. Chapter 10: Using CoreML and Vision in Swift 11. Chapter 11: Immersive Swift with ARKit and Augmented Reality 12. Chapter 12: Visualizing Data with Swift Charts 13. Index 14. Other Books You May Enjoy

What this book covers

Chapter 1, Swift Fundamentals, introduces you to the basic concepts of Swift, its syntax, and the functionality of basic components. Additionally, you will be introduced to Apple’s Xcode IDE and Swift Playgrounds, which provide developers with powerful tools to create, execute, and debug their code efficiently, while also preparing you to follow the recipes throughout this book. You will learn how to write your first lines of code using Swift and understand the various basic elements that the Swift programming language has to offer.

Chapter 2, Mastering the Building Blocks, teaches you how to create more complex structures, building on top of the basic components covered in the first chapter, as well as utilizing some more advanced functionality available in the Swift standard library. You will learn how to use arrays, dictionaries, tuples, and some more abstract concepts, such as extensions and property observers.

Chapter 3, Data Wrangling with Swift, explains the importance of making decisions within programming and how to alter the control flow of your code. You will learn how to conditionally execute code with the if/else and switch statements. Additionally, you will have the chance to explore other approaches with for and while loops, and even how to handle Swift errors with the try, throw, do, and catch statements.

Chapter 4, Generics, Operators, and Nested Types, covers two advanced features of Swift, which are generics and operators. These features will aid you in building functionality that is both flexible and well-defined. Moreover, you will understand how nested types can be beneficial by allowing you to group types logically, control access to your constructs, and use namespacing.

Chapter 5, Beyond the Standard Library, assesses the frameworks that sit outside of the standard library, specifically the Foundation framework. Learning how to take advantage of these broader functionalities will help you make full use of the Swift programming language, taking your projects to the next level.

Chapter 6, Understanding Concurrency in Swift, outlines the concept of concurrency in programming and how it can be used to increase the performance and responsiveness of your code. You will learn the fundamental approach of concurrency in Swift, with Dispatch Queues and Dispatch Groups. Then, you will look at the modern concurrency approach in Swift, with the Async/Await framework.

Chapter 7, Building iOS Apps with UIKit, starts your journey of learning how to build your very own iOS applications, using the traditional UIKit framework. You will understand how to use storyboards to create a user interface. Then, you will explore the approach of testing behaviors and visual components within your app, using the XCTest and XCUITest frameworks.

Chapter 8, Building iOS Apps with SwiftUI, welcomes you to the modern and declarative user interface framework that is SwiftUI. You will expand your knowledge of the concepts used to build an app, covered in the previous chapter, by using a simplified process to create beautiful, interactive, and dynamic user interfaces. Additionally, you will learn how to take advantage of live previews within Xcode when building your SwiftUI application.

Chapter 9, Getting to Grips with Combine, discusses reactive programming and how to use the Combine framework to handle events and data changes in a functional and simplified manner. You will understand how to use a wide range of operators to manipulate streams of data, as well as handling errors and canceling operations.

Chapter 10, Using CoreML and Vision in Swift, dives into the concepts of machine learning and also looks at the CoreML and Vision frameworks, covering how to process machine learning models to use within your apps. You will learn how to build an app for intelligent image recognition and adapt powerful techniques for a live video streamed on your device.

Chapter 11, Immersive Swift with ARKit and Augmented Reality, explores how to blend the virtual and physical worlds with 3D objects through the lens of your device’s camera. You will learn the fundamentals of the ARKit framework and how to leverage the Augmented Reality tools available to create beautiful virtual scenes. Moreover, you will have the opportunity to create your first scene for visionOS.

Chapter 12, Visualizing Data with Swift Charts, shows you how to create visually appealing and easily understandable charts to represent data, using the Charts and SwiftUI frameworks. You will learn about the different types of chart markings, how to handle multiple datasets, and how to use visual modifiers.

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 €18.99/month. Cancel anytime