Beginning iPhone Development with Swift 5 (eBook)
XV, 648 Seiten
Apress (Verlag)
978-1-4842-4865-2 (ISBN)
Learn how to integrate all the interface elements iOS users have come to know and love, such as buttons, switches, pickers, toolbars, and sliders. In this edition of the best selling book, you'll also learn about touch gestures, table views, and collection views for displaying data on a user interface.
Assuming little or no working knowledge of the Swift programming language, and written in a friendly, easy-to-follow style, this book offers a comprehensive course in iPhone and iPad programming. The book starts with a gentle introduction to using Xcode and then guides you though the creation of your first simple application.
You'll start with designing basic user interfaces and then explore more sophisticated ones that involve multiple screens such as navigation controllers, tab bars, tool bars, page views, and split views that are particularly useful on the larger screens of the iPad and certain iPhone models. And there's much more!
Beginning iPhone Development with Swift 5 covers the basic information you need to get up and running quickly to turn your great ideas into working iOS apps. Once you're ready, move on to Pro iPhone Development with Swift 5 to learn more of the really unique aspects of iOS programming and the Swift language.
What You Will Learn
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.
Learn how to integrate all the interface elements iOS users have come to know and love, such as buttons, switches, pickers, toolbars, and sliders. In this edition of the best selling book, you'll also learn about touch gestures, table views, and collection views for displaying data on a user interface. Assuming little or no working knowledge of the Swift programming language, and written in a friendly, easy-to-follow style, this book offers a comprehensive course in iPhone and iPad programming. The book starts with a gentle introduction to using Xcode and then guides you though the creation of your first simple application.You'll start with designing basic user interfaces and then explore more sophisticated ones that involve multiple screens such as navigation controllers, tab bars, tool bars, page views, and split views that are particularly useful on the larger screens of the iPad and certain iPhone models. And there's much more!Beginning iPhone Development with Swift 5 covers the basic information you need to get up and running quickly to turn your great ideas into working iOS apps. Once you're ready, move on to Pro iPhone Development with Swift 5 to learn more of the really unique aspects of iOS programming and the Swift language.What You Will LearnDiscover what data persistence is, and why it's importantBuild cool, crisp user interfacesDisplay data in Table ViewsWork with all the most commonly used iOS FrameworksWho This Book is ForAspiring iOS app developers new to the Apple Swift programming language and/or the iOS SDK.
Table of Contents 5
About the Author 12
About the Technical Reviewer 13
Chapter 1: Understanding iOS Programming 14
Learning About Xcode 18
Summary 33
Chapter 2: Designing User Interfaces 34
Learning About Views and Class Files 45
Working with Different Screen Sizes 52
Previewing the User Interface 58
Summary 62
Chapter 3: Writing Swift Code 64
Creating IBOutlet Variables 66
Creating IBAction Methods 73
Using Apple’s Frameworks 78
Using the Xcode Editor 80
Getting Help with Swift Commands 82
Folding and Unfolding Functions 84
Summary 84
Chapter 4: Using Xcode 86
Changing Xcode’s Appearance 86
The Navigator Pane 87
The Toolbar 91
The Tab Bar 95
Marking Swift Code 97
Renaming and Deleting IBOutlet Variables 100
Summary 103
Chapter 5: Working with Controllers 105
Understanding Controllers 105
Working with Multiple Controllers 111
Transitioning Between Controllers 114
Embedding in a Navigation Controller 120
Using a Navigation Controller 124
Summary 126
Chapter 6: Adding User Interface Objects 128
Changing the Size and Position of Objects 129
Changing an Object’s Attributes 133
Understanding the Safe Area 135
Defining Constraints 139
Defining Constraints Automatically 140
Viewing and Deleting Constraints 144
Adding Constraints Manually 146
Using Stack Views 154
Summary 158
Chapter 7: Using Common User Interface Objects 160
Using Labels 162
Using Text Fields 172
Defining Different Keyboards 180
Defining the Content of a Text Field 182
Modifying the Appearance of a Text Field 185
Using Buttons 189
Summary 191
Chapter 8: Steppers, Sliders, Progress Views, and Activity Indicator Views 193
Using Steppers 194
Using Sliders 200
Modifying a Slider with Swift Code 203
Using the Progress and Activity Indicator Views 205
Using a Progress View 209
Summary 214
Chapter 9: Image Views and Text Views 215
Using Image Views 215
Making the Image View Interactive 220
Using a Text View 223
Changing Text Appearance in a Text View 227
Creating Clickable Text in a Text View 229
Displaying the Virtual Keyboard with a Text View 232
Summary 236
Chapter 10: Buttons, Switches, and Segmented Controls 237
Understanding Events 238
Using Buttons 239
Using a Switch 242
Using a Segmented Control 246
Connecting Multiple Objects to the Same IBAction Method 251
Summary 262
Chapter 11: Touch Gestures 263
Detecting Tap Gestures 264
Detecting Pinch Gestures 273
Detecting Rotation Gestures 280
Detecting Pan Gestures 287
Detecting Screen Edge Pan Gestures 294
Detecting Swipe Gestures 301
Detecting Long Press Gestures 310
Summary 316
Chapter 12: Using Alerts and Pickers 317
Using an Alert Controller 318
Displaying and Responding to Multiple Buttons 321
Displaying a Text Field on an Alert Controller 325
Using a Date Picker 330
Creating a Custom Picker 337
Displaying a Multiple-Component Picker View 343
Summary 349
Chapter 13: Constraints and Stack Views 350
Understanding Constraints 351
Using Stack Views 362
Summary 368
Chapter 14: Using Table Views 370
Creating a Simple Table View 371
Selecting an Item in a Table View 383
Creating Grouped Tables 386
Displaying Indexes 396
Using a Table View Controller 404
Summary 413
Chapter 15: Customizing Table View Cells 414
Customizing a Table View Cell in Swift 415
Designing a Custom Table View Cell 424
Swipe to Add and Delete a Row 435
Summary 446
Chapter 16: Using Collection Views 447
Creating a Collection View 447
Displaying Data in a Collection View 453
Displaying Section Headers in a Collection View 462
Summary 474
Chapter 17: Using the Navigation Controller 475
Using a Navigation Controller 476
Passing Data to Other Views 485
Displaying Multiple Views in a Navigation Controller 491
Customizing the Navigation Bar 500
Modifying the Prompt and Title Text 500
Modifying the Back Button 505
Modifying the Color of the Navigation Bar 508
Adding Buttons to a Navigation Bar 509
Summary 517
Chapter 18: Using Tab Bars and Tool Bars 519
Switching View Controllers in a Tab Bar Controller 522
Customizing Tab Bar Icons 527
Deleting View Controllers from a Tab Bar Controller 533
Creating a Tool Bar 534
Adding and Deleting Tool Bar Buttons 538
Summary 542
Chapter 19: Using the Page View Controller 544
Adding and Customizing a Page Controller 545
Adding View Controllers 547
Making View Controllers Appear in a Page Controller 551
Summary 560
Chapter 20: Using the Split View Controller 561
Understanding the Structure of a Split View Controller 564
Adding a Split View Controller to a Storyboard 574
Creating Class Files 579
Modifying the AppDelegate.swift File 580
Modifying the DetailViewController.swift File 583
Modifying the MasterTableViewController.swift File 586
Summary 589
Appendix: An Introduction to Swift 591
Storing Data 594
Storing Different Data Types 597
Using Optional Data Types 601
Using Comments 605
Mathematical and String Operators 606
Branching Statements 609
Using Boolean Values 609
Using Boolean Operators 611
Using If Statements 612
Using Switch Statements 614
Looping Statements 617
Using the For Loop 618
Using the While Loop 619
Using the Repeat Loop 620
Functions 621
Data Structures 624
Storing Data in Arrays 624
Storing Data in Tuples 627
Storing Data in Dictionaries 629
Storing Data in Structures 632
Classes and Object-Oriented Programming 634
Understanding Encapsulation 635
Understanding Inheritance 636
Understanding Polymorphism 638
Summary 640
Index 642
Erscheint lt. Verlag | 31.5.2019 |
---|---|
Zusatzinfo | XV, 648 p. 398 illus., 376 illus. in color. |
Sprache | englisch |
Themenwelt | Informatik ► Betriebssysteme / Server ► iOS |
Informatik ► Betriebssysteme / Server ► Macintosh / Mac OS X | |
Informatik ► Programmiersprachen / -werkzeuge ► Mac / Cocoa Programmierung | |
Informatik ► Weitere Themen ► Smartphones / Tablets | |
Schlagworte | Apple • Apps • core data • core location • Development • iCloud • Ios • iPad programming • iPhone • map kit • programming • Software • Sprite kit • SWIFT • tvos • WatchOS • Xcode |
ISBN-10 | 1-4842-4865-1 / 1484248651 |
ISBN-13 | 978-1-4842-4865-2 / 9781484248652 |
Haben Sie eine Frage zum Produkt? |
Größe: 23,8 MB
DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasserzeichen und ist damit für Sie personalisiert. Bei einer missbräuchlichen Weitergabe des eBooks an Dritte ist eine Rückverfolgung an die Quelle möglich.
Dateiformat: PDF (Portable Document Format)
Mit einem festen Seitenlayout eignet sich die PDF besonders für Fachbücher mit Spalten, Tabellen und Abbildungen. Eine PDF kann auf fast allen Geräten angezeigt werden, ist aber für kleine Displays (Smartphone, eReader) nur eingeschränkt geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.
Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich