E-Book, Englisch, 373 Seiten
Kaczmarek / Lees / Bennett Swift 5 for Absolute Beginners
5th ed
ISBN: 978-1-4842-4868-3
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
Learn to Develop Apps for iOS
E-Book, Englisch, 373 Seiten
ISBN: 978-1-4842-4868-3
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
Stay motivated and overcome obstacles while learning to use Swift Playgrounds and Xcode 10.2 to become a great iOS developer. This book, fully updated for Swift 5, is perfect for those with no programming background, those with some programming experience but no object-oriented experience, or those that have a great idea for an app but haven't programmed since school.Many people have a difficult time believing they can learn to write iOS apps. Swift 5 for Absolute Beginners will show you how to do so. You'll learn Object-Oriented Programming (OOP) and be introduced to User Interface (UI) design following Apple's Human Interface Guidelines (HIG) using storyboards and the Model-View-Controller (MVC) pattern before moving on to write your own iPhone and Apple Watch apps from scratch.What You'll LearnWork with Swift classes, properties, and functions
Examine proper User Interface (UI) and User Experience (UX) design
Understand Swift data types: integers, floats, strings, and booleans
Use Swift data collections: arrays and dictionaries
Review Boolean logic, comparing data, and flow control
Use the Xcode debugger to troubleshoot problems with your apps
Store data in local app preferences and Core Data databases
Who This Book Is ForAnyone who wants to learn to develop apps for the Mac, iPhone, iPad, and Apple Watch using the Swift programming language. No previous programming experience is necessary.
Stefan Kaczmarek is a software Engineer with over 20 years of experience specializing in mobile applications, large-scale software systems, project management, network protocols, encryption algorithms, and audio/video codecs. He has experience developing iOS software from webcams to fitness to education to point of sale. Stefan is also the author of Swift 4 For Absolute Beginners and Objective-C For Absolute Beginners.
Brad Lees has more than a decade of experience in application development and server management. He has specialized in creating and initiating software programs in real-estate development systems and financial institutions. His career has been highlighted by his positions as information systems manager at The Lyle Anderson Company, product development manager for Smarsh, vice president of application development for iNation, and IT manager at The Orcutt/Winslow Partnership, the largest architectural firm in Arizona. A graduate of Arizona State University, Brad and his wife, Natalie, reside in Phoenix with their five children.
Autoren/Hrsg.
Weitere Infos & Material
1;Table of Contents;4
2;About the Authors;11
3;About the Technical Reviewer;13
4;Introduction;14
5;Chapter 1: Becoming a Great iOS Developer;21
5.1;Thinking like a Developer;21
5.2;Completing the Development Cycle;25
5.3;Introducing Object-Oriented Programming;27
5.4;Working with the Playground Interface;31
5.5;Summary;32
5.6;What’s Next;33
6;Chapter 2: Programming Basics;34
6.1;Touring Xcode;34
6.1.1;Exploring the Workspace Window;35
6.1.2;Navigating Your Workspace;37
6.1.3;Editing Your Project Files;38
6.2;Creating Your First Swift Playground Program;40
6.2.1;Installing and Launching Xcode 10.2;40
6.2.2;Using Xcode 10.2;42
6.3;Xcode Playground IDE: Editor and Results Areas;44
6.4;Summary;46
7;Chapter 3: It’s All About the Data;47
7.1;Numbering Systems Used in Programming;47
7.1.1;Bits;47
7.1.1.1;Moore’s Law;49
7.1.2;Bytes;49
7.1.3;Hexadecimal;51
7.1.4;Unicode;53
7.2;Data Types;53
7.3;Declaring Constants and Variables;54
7.4;Optionals;56
7.5;Using Variables in Playgrounds;57
7.6;Summary;61
8;Chapter 4: Making Decisions, Program Flow, and App Design;63
8.1;Boolean Logic;64
8.1.1;Truth Tables;65
8.1.2;Comparison Operators;67
8.2;Designing Apps;68
8.2.1;Pseudocode;68
8.2.2;Optionals and Forced Unwrapping;72
8.2.2.1;Optional Binding;73
8.2.2.2;Implicitly Unwrapped Optionals;74
8.2.3;Flowcharting;74
8.2.4;Designing and Flowcharting an Example App;75
8.2.5;The App’s Design;76
8.2.6;Using Loops to Repeat Program Statements;77
8.2.6.1;Count-Controlled Loops;77
8.2.6.2;Condition-Controlled Loops;78
8.2.6.3;Infinite Loops;78
8.3;Coding the Example App in Swift;79
8.3.1;Nested if Statements and else if Statements;83
8.3.2;Removing Extra Characters;83
8.3.3;Improving the Code Through Refactoring;84
8.3.4;Running the App;84
8.3.5;Design Requirements;86
8.4;Summary;89
9;Chapter 5: Object-Oriented Programming with Swift;92
9.1;The Object;93
9.2;What Is a Class?;94
9.3;Planning Classes;95
9.3.1;Planning Properties;95
9.3.2;Planning Methods;98
9.3.3;Implementing the Classes;100
9.4;Inheritance;108
9.5;Why Use OOP?;109
9.5.1;OOP Is Everywhere;110
9.5.2;Eliminate Redundant Code;110
9.5.3;Ease of Debugging;110
9.5.4;Ease of Replacement;110
9.6;Advanced Topics;111
9.6.1;Interface;111
9.6.2;Polymorphism;111
9.6.3;Value Orientated Programming;112
9.7;Summary;113
10;Chapter 6: Learning Swift and Xcode;114
10.1;A Newcomer;114
10.2;Understanding the Language Symbols;115
10.3;Implementing Objects in Swift;116
10.4;Writing Another Program in Xcode;119
10.4.1;Creating the Project;119
10.5;Summary;136
11;Chapter 7: Swift Classes, Objects, and Methods;138
11.1;Creating a Swift Class;138
11.1.1;Properties;140
11.1.2;Methods;140
11.1.2.1;Using Type Methods;141
11.1.2.2;Using Instance Methods;142
11.2;Using Your New Class;143
11.2.1;Creating Your Project;143
11.2.2;Adding Objects;146
11.2.3;Writing the Class;150
11.2.4;Creating the User Interface;153
11.2.5;Hooking Up the Code;157
11.2.6;Running the Program;161
11.2.7;Taking Type Methods to the Next Level;162
11.3;Accessing the Xcode Documentation;163
11.4;Summary;164
12;Chapter 8: Programming Basics in Swift;166
12.1;Using let vs. var;166
12.2;Understanding Collections;167
12.3;Using Arrays;167
12.4;Using the Dictionary Class;170
12.5;Creating the BookStore Application;172
12.5.1;Creating Your Class;176
12.5.2;Introducing Properties;177
12.5.3;Accessing Properties;178
12.6;Finishing the BookStore Program;179
12.6.1;Creating the View;179
12.6.2;Adding Properties;182
12.6.3;Adding a Description;184
12.6.4;Creating a Simple Data Model Class;186
12.6.5;Modifying the MasterViewController;188
12.6.6;Modifying the DetailViewController;192
12.7;Summary;194
13;Chapter 9: Comparing Data;196
13.1;Revisiting Boolean Logic;196
13.2;Using Relational Operators;197
13.2.1;Comparing Numbers;198
13.2.2;Creating an Example Xcode App;199
13.3;Using Boolean Expressions;203
13.3.1;Comparing Strings;204
13.4;Using the switch Statement;206
13.4.1;Comparing Dates;207
13.4.2;Combining Comparisons;209
13.5;Summary;210
14;Chapter 10: Creating User Interfaces;212
14.1;Understanding Interface Builder;213
14.2;The Model-View-Controller Pattern;214
14.3;Human Interface Guidelines;216
14.4;Creating an Example iPhone App with Interface Builder;218
14.4.1;Using Interface Builder;224
14.4.2;The Document Outline;226
14.4.3;The Object Library;226
14.4.4;Inspector Pane and Selector Bar;230
14.4.5;Creating the View;230
14.4.6;Using Outlets;233
14.4.7;Using Actions;237
14.4.8;The Class;239
14.5;Summary;242
15;Chapter 11: Storing Information;244
15.1;Storage Considerations;244
15.2;Preferences/UserDefaults;245
15.2.1;Writing Preferences;245
15.2.2;Reading Preferences;247
15.3;Databases;248
15.4;Storing Information in a Database;248
15.5;Getting Started with Core Data;249
15.6;The Model;251
15.6.1;Managed Object Context;259
15.6.2;Setting Up the Interface;259
15.7;Summary;275
16;Chapter 12: Protocols and Delegates;277
16.1;Multiple Inheritance;277
16.2;Understanding Protocols;279
16.3;Protocol Syntax;280
16.4;Delegation;280
16.5;Protocol and Delegation Example;281
16.6;Getting Started;282
16.7;How It Works;294
16.8;Summary;295
17;Chapter 13: Introducing the Xcode Debugger;296
17.1;Getting Started with Debugging;297
17.1.1;Setting Breakpoints;298
17.1.2;Using the Breakpoint Navigator;300
17.1.3;Debugging Basics;302
17.1.4;Working with the Debugger Controls;305
17.2;Using the Step Controls;305
17.2.1;Looking at the Thread Window and Call Stack;307
17.2.2;Debugging Variables;307
17.3;Dealing with Code Errors and Warnings;309
17.3.1;Errors;309
17.3.2;Warnings;311
17.4;Summary;312
18;Chapter 14: A Swift iPhone App;313
18.1;Let’s Get Started;313
18.1.1;Switches;328
18.1.2;Alert Controllers;329
18.2;App Summary;337
19;Chapter 15: Apple Watch and WatchKit;339
19.1;Considerations When Creating a watchOS App;339
19.2;Creating an Apple Watch App;340
19.3;Adding More Functionality;358
19.4;Summary;365
20;Index;366




