SwiftUI Essentials - iOS Edition

Learn to Develop iOS Apps Using SwiftUI, Swift 5 and Xcode 11
 
 
Payload Media, Inc. (Verlag)
  • 1. Auflage
  • |
  • erschienen am 10. November 2018
  • |
  • 340 Seiten
 
E-Book | ePUB mit Adobe DRM | Systemvoraussetzungen
978-1-951442-06-4 (ISBN)
 

The goal of this book is to teach the skills necessary to build iOS 13 applications using SwiftUI, Xcode 11 and the Swift 5 programming language.

Beginning with the basics, this book provides an outline of the steps necessary to set up an iOS development environment together with an introduction to the use of Swift Playgrounds to learn and experiment with Swift.

The book also includes in depth chapters introducing the Swift 5 programming language including data types, control flow, functions, object-oriented programming, property wrappers and error handling.

An introduction to the key concepts of SwiftUI and project architecture is followed by a guided tour of Xcode in SwiftUI development mode. The book also covers the creation of custom SwiftUI views and explains how these views are combined to create user interface layouts including the use of stacks, frames and forms.

Other topics covered include data handling using state properties and both observable and environment objects, as are key user interface design concepts such as modifiers, lists, tabbed views, context menus and user interface navigation.

The book also includes chapters covering graphics drawing, user interface animation, view transitions and gesture handling.

Chapters are also provided explaining how to integrate SwiftUI views into existing UIKit-based projects and explains the integration of UIKit code into SwiftUI.

Finally, the book explains how to package up a completed app and upload it to the App Store for publication.

Along the way, the topics covered in the book are put into practice through detailed tutorials, the source code for which is also available for download.

The aim of this book, therefore, is to teach you the skills necessary to build your own apps for iOS 13 using SwiftUI. Assuming you are ready to download the iOS 13 SDK and Xcode 11 and have an Intel-based Mac you are ready to get started.

1. Auflage
  • Englisch
  • Cary
  • |
  • USA
  • Windows
  • 21,80 MB
978-1-951442-06-4 (9781951442064)
weitere Ausgaben werden ermittelt
  • Intro
  • 1. Start Here
  • 1.1 For Swift Programmers
  • 1.2 For Non-Swift Programmers
  • 1.3 Source Code Download
  • 1.4 Feedback
  • 1.5 Errata
  • 2. Joining the Apple Developer Program
  • 2.1 Downloading Xcode 11 and the iOS 13 SDK
  • 2.2 Apple Developer Program
  • 2.3 When to Enroll in the Apple Developer Program?
  • 2.4 Enrolling in the Apple Developer Program
  • 2.5 Summary
  • 3. Installing Xcode 11 and the iOS 13 SDK
  • 3.1 Identifying Your macOS Version
  • 3.2 Installing Xcode 11 and the iOS 13 SDK
  • 3.3 Starting Xcode
  • 3.4 Adding Your Apple ID to the Xcode Preferences
  • 3.5 Developer and Distribution Signing Identities
  • 4. An Introduction to Xcode 11 Playgrounds
  • 4.1 What is a Playground?
  • 4.2 Creating a New Playground
  • 4.3 A Basic Swift Playground Example
  • 4.4 Viewing Results
  • 4.5 Adding Rich Text Comments
  • 4.6 Working with Playground Pages
  • 4.7 Working with UIKit in Playgrounds
  • 4.8 Adding Resources to a Playground
  • 4.9 Working with Enhanced Live Views
  • 4.10 Summary
  • 5. Swift Data Types, Constants and Variables
  • 5.1 Using a Swift Playground
  • 5.2 Swift Data Types
  • 5.2.1 Integer Data Types
  • 5.2.2 Floating Point Data Types
  • 5.2.3 Bool Data Type
  • 5.2.4 Character Data Type
  • 5.2.5 String Data Type
  • 5.2.6 Special Characters/Escape Sequences
  • 5.3 Swift Variables
  • 5.4 Swift Constants
  • 5.5 Declaring Constants and Variables
  • 5.6 Type Annotations and Type Inference
  • 5.7 The Swift Tuple
  • 5.8 The Swift Optional Type
  • 5.9 Type Casting and Type Checking
  • 5.10 Summary
  • 6. Swift Operators and Expressions
  • 6.1 Expression Syntax in Swift
  • 6.2 The Basic Assignment Operator
  • 6.3 Swift Arithmetic Operators
  • 6.4 Compound Assignment Operators
  • 6.5 Comparison Operators
  • 6.6 Boolean Logical Operators
  • 6.7 Range Operators
  • 6.8 The Ternary Operator
  • 6.9 Bitwise Operators
  • 6.9.1 Bitwise NOT
  • 6.9.2 Bitwise AND
  • 6.9.3 Bitwise OR
  • 6.9.4 Bitwise XOR
  • 6.9.5 Bitwise Left Shift
  • 6.9.6 Bitwise Right Shift
  • 6.10 Compound Bitwise Operators
  • 6.11 Summary
  • 7. Swift Control Flow
  • 7.1 Looping Control Flow
  • 7.2 The Swift for-in Statement
  • 7.2.1 The while Loop
  • 7.3 The repeat ... while loop
  • 7.4 Breaking from Loops
  • 7.5 The continue Statement
  • 7.6 Conditional Flow Control
  • 7.7 Using the if Statement
  • 7.8 Using if ... else . Statements
  • 7.9 Using if ... else if ... Statements
  • 7.10 The guard Statement
  • 7.11 Summary
  • 8. The Swift Switch Statement
  • 8.1 Why Use a switch Statement?
  • 8.2 Using the switch Statement Syntax
  • 8.3 A Swift switch Statement Example
  • 8.4 Combining case Statements
  • 8.5 Range Matching in a switch Statement
  • 8.6 Using the where statement
  • 8.7 Fallthrough
  • 8.8 Summary
  • 9. An Overview of Swift 5 Functions, Methods and Closures
  • 9.1 What is a Function?
  • 9.2 What is a Method?
  • 9.3 How to Declare a Swift Function
  • 9.4 Implicit Returns from Single Expressions
  • 9.5 Calling a Swift Function
  • 9.6 Handling Return Values
  • 9.7 Local and External Parameter Names
  • 9.8 Declaring Default Function Parameters
  • 9.9 Returning Multiple Results from a Function
  • 9.10 Variable Numbers of Function Parameters
  • 9.11 Parameters as Variables
  • 9.12 Working with In-Out Parameters
  • 9.13 Functions as Parameters
  • 9.14 Closure Expressions
  • 9.15 Closures in Swift
  • 9.16 Summary
  • 10. The Basics of Object-Oriented Programming in Swift
  • 10.1 What is an Instance?
  • 10.2 What is a Class?
  • 10.3 Declaring a Swift Class
  • 10.4 Adding Instance Properties to a Class
  • 10.5 Defining Methods
  • 10.6 Declaring and Initializing a Class Instance
  • 10.7 Initializing and Deinitializing a Class Instance
  • 10.8 Calling Methods and Accessing Properties
  • 10.9 Stored and Computed Properties
  • 10.10 Lazy Stored Properties
  • 10.11 Using self in Swift
  • 10.12 Understanding Swift Protocols
  • 10.13 Opaque Return Types
  • 10.14 Summary
  • 11. An Introduction to Swift Subclassing and Extensions
  • 11.1 Inheritance, Classes and Subclasses
  • 11.2 A Swift Inheritance Example
  • 11.3 Extending the Functionality of a Subclass
  • 11.4 Overriding Inherited Methods
  • 11.5 Initializing the Subclass
  • 11.6 Using the SavingsAccount Class
  • 11.7 Swift Class Extensions
  • 11.8 Summary
  • 12. An Introduction to Swift Structures
  • 12.1 An Overview of Swift Structures
  • 12.2 Value Types vs. Reference Types
  • 12.3 When to use Structures or Classes
  • 12.4 Summary
  • 13. An Introduction to Swift Property Wrappers
  • 13.1 Understanding Property Wrappers
  • 13.2 A Simple Property Wrapper Example
  • 13.3 Supporting Multiple Variables and Types
  • 13.4 Summary
  • 14. Working with Array and Dictionary Collections in Swift
  • 14.1 Mutable and Immutable Collections
  • 14.2 Swift Array Initialization
  • 14.3 Working with Arrays in Swift
  • 14.3.1 Array Item Count
  • 14.3.2 Accessing Array Items
  • 14.4 Random Items and Shuffling
  • 14.5 Appending Items to an Array
  • 14.5.1 Inserting and Deleting Array Items
  • 14.6 Array Iteration
  • 14.7 Creating Mixed Type Arrays
  • 14.8 Swift Dictionary Collections
  • 14.9 Swift Dictionary Initialization
  • 14.10 Sequence-based Dictionary Initialization
  • 14.11 Dictionary Item Count
  • 14.12 Accessing and Updating Dictionary Items
  • 14.13 Adding and Removing Dictionary Entries
  • 14.14 Dictionary Iteration
  • 14.15 Summary
  • 15. Understanding Error Handling in Swift 5
  • 15.1 Understanding Error Handling
  • 15.2 Declaring Error Types
  • 15.3 Throwing an Error
  • 15.4 Calling Throwing Methods and Functions
  • 15.5 Accessing the Error Object
  • 15.6 Disabling Error Catching
  • 15.7 Using the defer Statement
  • 15.8 Summary
  • 16. An Overview of SwiftUI
  • 16.1 UIKit and Interface Builder
  • 16.2 SwiftUI Declarative Syntax
  • 16.3 SwiftUI is Data Driven
  • 16.4 SwiftUI vs. UIKit
  • 16.5 Summary
  • 17. Using Xcode in SwiftUI Mode
  • 17.1 Starting Xcode 11
  • 17.2 Creating a SwiftUI Project
  • 17.3 Xcode in SwiftUI Mode
  • 17.4 The Preview Canvas
  • 17.5 Preview Pinning
  • 17.6 Modifying the Design
  • 17.7 Editor Context Menu
  • 17.8 Previewing on Multiple Device Configurations
  • 17.9 Running the App on a Simulator
  • 17.10 Running the App on a Physical iOS Device
  • 17.11 Managing Devices and Simulators
  • 17.12 Enabling Network Testing
  • 17.13 Dealing with Build Errors
  • 17.14 Monitoring Application Performance
  • 17.15 Exploring the User Interface Layout Hierarchy
  • 17.16 Summary
  • 18. The Anatomy of a Basic SwiftUI Project
  • 18.1 Creating an Example Project
  • 18.2 UIKit and SwiftUI
  • 18.3 The AppDelegate.swift File
  • 18.4 The SceneDelegate.swift File
  • 18.5 ContentView.swift File
  • 18.6 Assets.xcassets
  • 18.7 Info.plist
  • 18.8 LaunchScreen.storyboard
  • 18.9 Summary
  • 19. Creating Custom Views with SwiftUI
  • 19.1 SwiftUI Views
  • 19.2 Creating a Basic View
  • 19.3 Adding Additional Views
  • 19.4 Working with Subviews
  • 19.5 Views as Properties
  • 19.6 Modifying Views
  • 19.7 Working with Text Styles
  • 19.8 Modifier Ordering
  • 19.9 Custom Modifiers
  • 19.10 Basic Event Handling
  • 19.11 The onAppear and onDisappear Methods
  • 19.12 Building Custom Container Views
  • 19.13 Summary
  • 20. SwiftUI Stacks and Frames
  • 20.1 SwiftUI Stacks
  • 20.2 Spacers, Alignment and Padding
  • 20.3 Container Child Limit
  • 20.4 Text Line Limits and Layout Priority
  • 20.5 SwiftUI Frames
  • 20.6 Frames and the Geometry Reader
  • 20.7 Summary
  • 21. Working with SwiftUI State, Observable and Environment Objects
  • 21.1 State Properties
  • 21.2 State Binding
  • 21.3 Observable Objects
  • 21.4 Environment Objects
  • 21.5 Summary
  • 22. A SwiftUI Example Tutorial
  • 22.1 Creating the Example Project
  • 22.2 Reviewing the Project
  • 22.3 Adding a VStack to the Layout
  • 22.4 Adding a Slider View to the Stack
  • 22.5 Adding a State Property
  • 22.6 Adding Modifiers to the Text View
  • 22.7 Adding Rotation and Animation
  • 22.8 Adding a TextField to the Stack
  • 22.9 Adding a Color Picker
  • 22.10 Tidying the Layout
  • 22.11 Summary
  • 23. SwiftUI Observable and Environment Objects - A Tutorial
  • 23.1 About the ObservableDemo Project
  • 23.2 Creating the Project
  • 23.3 Adding the Observable Object
  • 23.4 Designing the ContentView Layout
  • 23.5 Adding the Second View
  • 23.6 Adding Navigation
  • 23.7 Using an Environment Object
  • 23.8 Summary
  • 24. SwiftUI Stack Alignment and Alignment Guides
  • 24.1 Container Alignment
  • 24.2 Alignment Guides
  • 24.3 Using the Alignment Guides Tool
  • 24.4 Custom Alignment Types
  • 24.5 Cross Stack Alignment
  • 24.6 ZStack Custom Alignment
  • 24.7 Summary
  • 25. SwiftUI Lists and Navigation
  • 25.1 SwiftUI Lists
  • 25.2 SwiftUI Dynamic Lists
  • 25.3 SwiftUI NavigationView and NavigationLink
  • 25.4 Making the List Editable
  • 25.5 Summary
  • 26. A SwiftUI List and Navigation Tutorial
  • 26.1 About the ListNavDemo Project
  • 26.2 Creating the ListNavDemo Project
  • 26.3 Preparing the Project
  • 26.4 Adding the Car Structure
  • 26.5 Loading the JSON Data
  • 26.6 Adding the Data Store
  • 26.7 Designing the Content View
  • 26.8 Designing the Detail View
  • 26.9 Adding Navigation to the List
  • 26.10 Designing the Add Car View
  • 26.11 Implementing Add and Edit Buttons
  • 26.12 Adding the Edit Button Methods
  • 26.13 Summary
  • 27. Building Tabbed Views in SwiftUI
  • 27.1 An Overview of SwiftUI TabView
  • 27.2 Creating the TabViewDemo App
  • 27.3 Adding the TabView Container
  • 27.4 Adding the Content Views
  • 27.5 Adding the Tab Items
  • 27.6 Adding Tab Item Tags
  • 27.7 Summary
  • 28. Building Context Menus in SwiftUI
  • 28.1 Creating the ContextMenuDemo Project
  • 28.2 Preparing the Content View
  • 28.3 Adding the Context Menu
  • 28.4 Testing the Context Menu
  • 28.5 Summary
  • 29. Basic SwiftUI Graphics Drawing
  • 29.1 Creating the DrawDemo Project
  • 29.2 SwiftUI Shapes
  • 29.3 Using Overlays
  • 29.4 Drawing Custom Paths and Shapes
  • 29.5 Drawing Gradients
  • 29.6 Summary
  • 30. SwiftUI Animation and Transitions
  • 30.1 Creating the AnimationDemo Example Project
  • 30.2 Implicit Animation
  • 30.3 Repeating an Animation
  • 30.4 Explicit Animation
  • 30.5 Animation and State Bindings
  • 30.6 Automatically Starting an Animation
  • 30.7 SwiftUI Transitions
  • 30.8 Combining Transitions
  • 30.9 Asymmetrical Transitions
  • 30.10 Summary
  • 31. Working with Gesture Recognizers in SwiftUI
  • 31.1 Creating the GestureDemo Example Project
  • 31.2 Basic Gestures
  • 31.3 The onChange Action Callback
  • 31.4 The updating Callback Action
  • 31.5 Composing Gestures
  • 31.6 Summary
  • 32. Integrating UIViews with SwiftUI
  • 32.1 SwiftUI and UIKit Integration
  • 32.2 Integrating UIViews into SwiftUI
  • 32.3 Adding a Coordinator
  • 32.4 Handling UIKit Delegation and Data Sources
  • 32.5 An Example Project
  • 32.6 Wrapping the UIScrolledView
  • 32.7 Implementing the Coordinator
  • 32.8 Using MyScrollView
  • 32.9 Summary
  • 33. Integrating UIViewControllers with SwiftUI
  • 33.1 UIViewControllers and SwiftUI
  • 33.2 Creating the ViewControllerDemo project
  • 33.3 Wrapping the UIImagePickerController
  • 33.4 Designing the Content View
  • 33.5 Completing MyImagePicker
  • 33.6 Completing the Content View
  • 33.7 Testing the App
  • 33.8 Summary
  • 34. Integrating SwiftUI with UIKit
  • 34.1 An Overview of the Hosting Controller
  • 34.2 A UIHostingController Example Project
  • 34.3 Adding the SwiftUI Content View
  • 34.4 Preparing the Storyboard
  • 34.5 Adding a Hosting Controller
  • 34.6 Configuring the Segue Action
  • 34.7 Embedding a Container View
  • 34.8 Embedding SwiftUI in Code
  • 34.9 Summary
  • 35. Preparing and Submitting an iOS 13 Application to the App Store
  • 35.1 Verifying the iOS Distribution Certificate
  • 35.2 Adding App Icons
  • 35.3 Designing the Launch Screen
  • 35.4 Assign the Project to a Team
  • 35.5 Archiving the Application for Distribution
  • 35.6 Configuring the Application in iTunes Connect
  • 35.7 Validating and Submitting the Application
  • 35.8 Configuring and Submitting the App for Review
  • Index

Dateiformat: EPUB
Kopierschutz: Adobe-DRM (Digital Rights Management)

Systemvoraussetzungen:

Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat EPUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Bitte beachten Sie bei der Verwendung der Lese-Software Adobe Digital Editions: wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!

Weitere Informationen finden Sie in unserer E-Book Hilfe.


Download (sofort verfügbar)

34,99 €
inkl. 7% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe DRM
siehe Systemvoraussetzungen
E-Book bestellen