Wang | macOS Programming for Absolute Beginners | E-Book | sack.de
E-Book

E-Book, Englisch, 658 Seiten, eBook

Wang macOS Programming for Absolute Beginners

Developing Apps Using Swift and Xcode
1. Auflage 2017
ISBN: 978-1-4842-2662-9
Verlag: APRESS
Format: PDF
Kopierschutz: 1 - PDF Watermark

Developing Apps Using Swift and Xcode

E-Book, Englisch, 658 Seiten, eBook

ISBN: 978-1-4842-2662-9
Verlag: APRESS
Format: PDF
Kopierschutz: 1 - PDF Watermark



Learn how to code for the iMac, Mac mini, Mac Pro, and MacBook using Swift, Apple's hottest programming language.Fully updated to cover the new MacBook Touch Bar, macOS Programming for Absolute Beginners will not only teach complete programming novices how to write macOS programs, but it can also help experienced programmers moving to the Mac for the first time. You will learn the principles of programming, how to use Swift and Xcode, and how to combine your knowledge into writing macOS programs. If you've always wanted to learn coding but felt stymied by the limitation of simplistic programming languages or intimidated by professional but complicated programming languages, then you'll want to learn Swift. Swift is your gateway to both Mac and iOS app development while being powerful and easy to learn at the same time, and macOS Programming for Absolute Beginners is the perfect place to start - add it to your library today.What You'll LearnMaster the basic principles of object-oriented programming Use Xcode, the main programming tool used for both macOS and iOS development See what makes Swift unique and powerful as a programming language and why you should learn it Create macOS programs using Swift and Xcode Apply interface principles that follow Apple's Human Interface GuidelinesTake advantage of the new Touch BarWho This Book Is ForPeople who want to learn programming for the first time and for experienced programmers wanting to learn Xcode and the Mac for the first time.

Wang macOS Programming for Absolute Beginners jetzt bestellen!

Zielgruppe


Professional/practitioner


Autoren/Hrsg.


Weitere Infos & Material


1;Contents at a Glance;5
2;Contents;7
3;About the Author;17
4;About the Technical Reviewer;18
5;Acknowledgments;19
6;Introduction;20
7;Chapter 1: Understanding Programming;24
7.1;Programming Principles;25
7.2;Structured Programming;29
7.3;Event-Driven Programming;31
7.4;Object-Oriented Programming;31
7.4.1;Encapsulation;32
7.4.2;Inheritance;33
7.4.3;Polymorphism;34
7.5;Understanding Programming Languages;35
7.6;The Cocoa Framework;38
7.7;The View-Model-Controller Design;40
7.8;How Programmers Work;42
7.9;Summary;43
8;Chapter 2: Getting to Know Xcode 8;45
8.1;Giving Commands to Xcode;47
8.2;Modifying the Xcode Window;50
8.3;Creating and Managing Files;54
8.4;Creating and Customizing a User Interface;61
8.5;The Standard and Assistant Editors;63
8.6;Running a Program;67
8.7;Summary;68
9;Chapter 3: The Basics of Creating a Mac Program;70
9.1;Creating a Project;71
9.2;Designing a User Interface;76
9.3;Using the Document Outline and Connections Inspector;93
9.4;Summary;96
10;Chapter 4: Getting Help;98
10.1;Understanding the Cocoa Framework;98
10.2;Looking Up Properties and Methods in a Class File;101
10.2.1;Looking Up Class Files with the Help Menu;102
10.2.2;Looking Up Class Files with Quick Help;104
10.3;Browsing the Documentation;106
10.4;Searching the Documentation;110
10.5;Using Code Completion;111
10.6;Understanding How macOS Programs Work;113
10.7;Summary;119
11;Chapter 5: Learning Swift with Playgrounds;120
11.1;Using Playgrounds;121
11.1.1;Storing Data in Swift;125
11.2;Using Unicode Characters as Names;130
11.3;Converting Data Types;133
11.4;Computed Properties;134
11.5;Using Optional Variables;138
11.6;Linking Swift Code to a User Interface;141
11.7;Summary;144
12;Chapter 6: Manipulating Numbers and Strings;146
12.1;Using Mathematical Operators;146
12.1.1;Compound Assignment Operators;148
12.2;Using Math Functions;149
12.2.1;Rounding Functions;149
12.2.2;Calculation Functions;151
12.2.3;Trigonometry Functions;152
12.2.4;Exponential Functions;154
12.2.5;Logarithmic Functions;155
12.3;Using String Functions;156
12.4;Summary;157
13;Chapter 7: Making Decisions with Branches;159
13.1;Understanding Comparison Operators;159
13.2;Understanding Logical Operators;161
13.3;The if Statement;164
13.4;The if-else Statement;166
13.5;The if-else-if Statement;167
13.6;The switch Statement;170
13.7;Making Decisions in an macOS Program;175
13.8;Summary;188
14;Chapter 8: Repeating Code with Loops;190
14.1;The while Loop;191
14.2;The repeat-while Loop;193
14.3;The for-in Loop;195
14.4;Counting Through Arrays with the for-in Loop;198
14.5;Exiting Loops Prematurely;199
14.6;Using Loops in an macOS Program;201
14.7;Summary;214
15;Chapter 9: Arrays and Dictionaries;215
15.1;Using Arrays;216
15.1.1;Adding Items to an Array;217
15.1.2;Deleting Items from an Array;219
15.1.3;Querying Arrays;221
15.1.4;Manipulating Arrays;221
15.2;Using Dictionaries;223
15.2.1;Adding Items to a Dictionary;224
15.2.2;Retrieving and Updating Data in a Dictionary;225
15.2.3;Deleting Data in a Dictionary;226
15.2.4;Querying a Dictionary;227
15.3;Using Dictionaries in a macOS Program;228
15.4;Summary;236
16;Chapter 10: Tuples and Sets;238
16.1;Using Tuples;238
16.1.1;Accessing Data in a Tuple;240
16.2;Using Sets;243
16.2.1;Creating a Set;244
16.2.2;Adding and Removing Items from a Set;244
16.2.3;Querying a Set;246
16.2.4;Manipulating Sets;249
16.3;Summary;251
17;Chapter 11: Storing Code in Functions;252
17.1;Simple Functions Without Parameters or Return Values;253
17.2;Simple Functions with Parameters;255
17.3;Functions with Parameters That Return Values;257
17.4;Using Variable Parameters;259
17.5;Using Inout Parameters;260
17.6;Returning Multiple Values;262
17.7;Understanding IBAction Methods;264
17.8;Summary;265
18;Chapter 12: Defining Custom Data Types;266
18.1;Typealiases;267
18.2;Using Enumerations;267
18.3;Using Structures;270
18.3.1;Storing and Retrieving Items from a Structure;272
18.4;Combining Data Structures;275
18.5;Summary;283
19;Chapter 13: Creating Classes and Objects;284
19.1;Creating Classes;285
19.1.1;Accessing Properties in an Object;287
19.1.2;Computed Properties in an Object;290
19.1.3;Setting Other Properties;291
19.1.4;Using Property Observers;294
19.2;Creating Methods;296
19.3;Using Objects in an macOS Program;299
19.4;Summary;309
20;Chapter 14: Inheritance, Polymorphism, and Extending Classes;311
20.1;Understanding Inheritance;312
20.1.1;Understanding Polymorphism;319
20.1.2;Overriding Properties;324
20.1.3;Preventing Polymorphism;327
20.2;Using Extensions;327
20.3;Using Protocols;329
20.3.1;Defining Optional Methods and Properties in Protocols;333
20.3.2;Using Inheritance with Protocols;335
20.4;Using Delegates;336
20.5;Using Inheritance in a macOS Program;341
20.6;Summary;347
21;Chapter 15: Creating a User Interface;349
21.1;Understanding User Interface Files;350
21.2;Searching the Object Library;351
21.2.1;User Interface Items That Display and Accept Text;356
21.2.2;User Interface Items That Restrict Choices;358
21.2.3;User Interface Items That Accept Commands;359
21.2.4;User Interface Items That Group Items;359
21.3;Using Constraints in Auto Layout;361
21.3.1;Defining Window Sizes;362
21.3.2;Placing Constraints on User Interface Items;369
21.3.3;Editing Constraints;375
21.4;Defining Constraints in a macOS Program;378
21.5;Summary;382
22;Chapter 16: Working with Storyboards;383
22.1;Using Storyboards;386
22.1.1;Adding Scenes to a Storyboard;390
22.1.2;Defining the Initial Scene in a Storyboard;391
22.1.3;Connecting Scenes with Segues;393
22.1.4;Displaying Scenes from a Segue;395
22.1.5;Adding a Controller File to a Scene;398
22.2;Summary;403
23;Chapter 17: Choosing Commands with Buttons;404
23.1;Modifying Text on a Button;406
23.2;Adding Images and Sounds to a Button;412
23.3;Connecting Multiple User Interface Items to IBAction Methods;414
23.4;Working with Pop-up Buttons;419
23.4.1;Modifying Popup Menu Items Visually;421
23.4.2;Adding Pop-up Menu Items with Swift Code;424
23.5;Summary;429
24;Chapter 18: Making Choices with Radio Buttons, Check Boxes, Date Pickers, and Sliders;430
24.1;Using Check Boxes;432
24.2;Using Radio Buttons;436
24.3;Using a Date Picker;442
24.4;Using Sliders;447
24.5;Summary;450
25;Chapter 19: Using Text with Labels, Text Fields, and Combo Boxes;452
25.1;Using Text Fields;453
25.1.1;Using a Number Formatter;454
25.1.2;Using a Secure Text Field, a Search Field, and a Token Field;462
25.2;Using Combo Boxes;468
25.2.1;Creating an Internal List;468
25.2.2;Using a Data Source;472
25.3;Summary;475
26;Chapter 20: Designing a User Interface with Constraints;476
26.1;Constraining a Window Size;477
26.2;Constraining User Interface Items to Window Edges;479
26.2.1;Editing a Constraint;484
26.2.2;Creating Size Constraints;489
26.2.3;Creating Constraints Between Multiple User Interface Items;491
26.2.4;Deleting Constraints;494
26.3;Summary;495
27;Chapter 21: Using Aler ts and Panels;496
27.1;Using Alerts;496
27.1.1;Getting Feedback from an Alert;499
27.1.2;Displaying Alerts as Sheets;502
27.2;Using Panels;506
27.2.1;Creating an Open Panel;506
27.2.2;Creating a Save Panel;509
27.2.3;Creating a Color Panel;511
27.3;Summary;515
28;Chapter 22: Creating Pull-Down Menus;517
28.1;Editing Pull-Down Menus;518
28.1.1;Adding New Pull-Down Menu Titles to the Menu Bar;521
28.1.2;Adding New Commands to a Pull-Down Menu;525
28.1.3;Editing Commands;528
28.1.4;Connecting Menu Commands to Swift Code;530
28.2;Summary;543
29;Chapter 23: Programming the Touch Bar;544
29.1;Adding a Touch Bar;545
29.2;Creating a Swift Class File;548
29.2.1;Adding Items to the Touch Bar;550
29.2.2;Connecting Touch Bar Items to Swift Code;551
29.3;Creating a Touch Bar Program;552
29.4;Summary;560
30;Chapter 24: Protocol-Oriented Programming;562
30.1;Understanding Protocols;563
30.1.1;Using Methods in Protocols;566
30.1.2;Adopting Multiple Protocols;569
30.1.3;Protocol Extensions;570
30.1.4;Using Protocol Extensions to Extend Common Data Types;578
30.2;Summary;580
31;Chapter 25: Defensive Programming;582
31.1;Test with Extreme Values;582
31.2;Working with Optional Variables;583
31.3;Working with Optional Chaining;586
31.4;Error Handling;591
31.4.1;Defining Errors with Enumerations;591
31.4.2;Creating a Function to Identify Errors;592
31.4.3;Handling the Error;593
31.5;Summary;596
32;Chapter 26: Simplifying User Interface Design;597
32.1;Using Stack View;597
32.2;Fixing Constraint Conflicts;600
32.3;Working with Storyboard References;607
32.4;Summary;612
33;Chapter 27: Debugging Your Programs;613
33.1;Simple Debugging Techniques;616
33.2;Using the Xcode Debugger;621
33.2.1;Using Breakpoints;622
33.2.2;Stepping Through Code;622
33.2.3;Managing Breakpoints;626
33.2.4;Using Symbolic Breakpoints;630
33.2.5;Using Conditional Breakpoints;633
33.3;Summary;634
34;Chapter 28: Planning a Program Before and After Coding;636
34.1;Identifying the Purpose of Your Program;637
34.2;Designing the Structure of a Program;639
34.3;Designing the User Interface of a Program;640
34.3.1;Design a User Interface with Paper and Pencil;641
34.3.2;Design a User Interface with Software;642
34.4;Marketing Your Software;644
34.4.1;Blogging About Your Software;645
34.4.2;Giving Away Free Software;646
34.4.3;Posting Videos About Your Software;647
34.4.4;Give Away Free Information;648
34.4.5;Join Social Networks;650
34.5;Summary;651
35;Index;652


Wallace Wang is a former Windows enthusiast who took one look at Vista and realized that the future of computing belonged to the Mac. He s written more than 40 computer books, including Microsoft Office for Dummies, Beginning Programming for Dummies, Steal This Computer Book, My New Mac, and My New iPad. In addition to programming the Mac and iPhone/iPad, he also performs stand-up comedy, having appeared on A&E s "Evening at the Improv," and having performed in Las Vegas at the Riviera Comedy Club at the Riviera Hotel & Casino. When he’s not writing computer books or performing stand-up comedy, he also enjoys blogging about screenwriting at his site, The 15 Minute Movie Method, where he shares screenwriting tips with other aspiring screenwriters who all share the goal of breaking into Hollywood.



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.