Programming iOS 13 Dive Deep into Views, View Controllers, and Frameworks (Matt Neuburg) (Z-Library)

Author: Matt Neuburg

其他

If you’re grounded in the basics of Swift, Xcode, and the Cocoa framework, this book provides a structured explanation of all essential real-world iOS app components. Through deep exploration and copious code examples, you’ll learn how to create views, manipulate view controllers, and add features from iOS frameworks. • Create, arrange, draw, layer, and animate views that respondto touch • Use view controllers to manage multiple screens of interface • Master interface classes for scroll views, table views, text,popovers, split views, web views, and controls • Dive into frameworks for sound, video, maps, and sensors • Access user libraries: music, photos, contacts, and calendar • Explore files, networking, and threads Stay up-to-date on iOS 13 innovations, such as: • Symbol images • Light and dark mode • Sheet presentation • Diffable data sources and compositional layout • Context menus and previews • Window scene delegates and multiple windows on iPad Want to brush up on the basics? Pick up iOS 13 Programming Fundamentals with Swiftto learn about Swift, Xcode, and Cocoa. Together with Programming iOS 13, you’ll gaina solid, rigorous, and practical understanding of iOS 13 development.

📄 File Format: PDF
💾 File Size: 13.1 MB
57
Views
0
Downloads
0.00
Total Donations

📄 Text Preview (First 20 pages)

ℹ️

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

📄 Page 1
Matt Neuburg Covers iOS 13, Xcode 11, and Swift 5.1 Programming iOS 13 Dive Deep into Views, View Controllers, and Frameworks
📄 Page 2
(This page has no text content)
📄 Page 3
Matt Neuburg Boston Programming iOS 13 Dive Deep into Views, View Controllers, and Frameworks TENTH EDITION
📄 Page 4
978-1-492-07461-8 [MBP] Programming iOS 13, Tenth Edition by Matt Neuburg Copyright © 2020 Matt Neuburg. All rights reserved. Printed in Canada. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institu‐ tional sales department: 800-998-9938 or corporate@oreilly.com. Editor: Rachel Roumeliotis Production Editor: Kristen Brown Proofreader: O’Reilly Production Services Indexer: Matt Neuburg Cover Designer: Randy Comer Interior Designer: David Futato Illustrator: Matt Neuburg May 2011: First Edition March 2012: Second Edition March 2013: Third Edition December 2013: Fourth Edition December 2014: Fifth Edition November 2015: Sixth Edition November 2016: Seventh Edition December 2017: Eighth Edition October 2018: Ninth Edition October 2019: Tenth Edition Revision History for the Tenth Edition: 2019-12-05: First release See http://oreilly.com/catalog/errata.csp?isbn=9781492074618 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Programming iOS 13, the cover image of a kingbird, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps. While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.
📄 Page 5
Table of Contents Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi Part I. Views 1. Views. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Window and Root View 4 How an App Launches 4 App Without a Storyboard 6 Referring to the Window 8 Experimenting with Views 8 Subview and Superview 9 Color 12 Visibility and Opacity 14 Frame 15 Bounds and Center 16 Transform 20 Transform3D 24 Window Coordinates and Screen Coordinates 26 Trait Collections 27 Interface Style 29 Size Classes 30 Overriding Trait Collections 31 Layout 32 Autoresizing 33 Autolayout and Constraints 35 Implicit Autoresizing Constraints 38 Creating Constraints in Code 40 Constraints as Objects 45 Margins and Guides 47 iii
📄 Page 6
Intrinsic Content Size 53 Self-Sizing Views 55 Stack Views 56 Internationalization 60 Mistakes with Constraints 60 Configuring Layout in the Nib 63 Autoresizing in the Nib 64 Creating a Constraint 65 Viewing and Editing Constraints 66 Problems with Nib Constraints 68 Varying the Screen Size 71 Conditional Interface Design 71 Xcode View Features 74 View Debugger 74 Previewing Your Interface 75 Designable Views and Inspectable Properties 75 Layout Events 78 2. Drawing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Images and Image Views 81 Image Files 82 Image Views 88 Resizable Images 90 Transparency Masks 93 Reversible Images 95 Graphics Contexts 96 Drawing on Demand 98 Drawing a UIImage 99 UIImage Drawing 100 CGImage Drawing 103 Snapshots 105 CIFilter and CIImage 106 Blur and Vibrancy Views 111 Drawing a UIView 112 Graphics Context Commands 114 Graphics Context Settings 115 Paths and Shapes 116 Clipping 120 Gradients 121 Colors and Patterns 122 Graphics Context Transforms 125 Shadows 127 iv | Table of Contents
📄 Page 7
Erasing 128 Points and Pixels 129 Content Mode 129 3. Layers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 View and Layer 132 Layers and Sublayers 133 Manipulating the Layer Hierarchy 136 Positioning a Sublayer 137 CAScrollLayer 138 Layer and Delegate 139 Layout of Layers 139 Drawing in a Layer 140 Drawing-Related Layer Properties 142 Content Resizing and Positioning 143 Layers that Draw Themselves 145 Transforms 146 Affine Transforms 147 3D Transforms 148 Depth 149 Further Layer Features 153 Shadows 153 Borders and Rounded Corners 154 Masks 154 Layer Efficiency 156 Layers and Key–Value Coding 157 4. Animation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Drawing, Animation, and Threading 160 Image View and Image Animation 162 View Animation 164 A Brief History of View Animation 164 Property Animator Basics 165 View Animation Basics 168 View Animation Configuration 171 Timing Curves 176 Canceling a View Animation 179 Frozen View Animation 183 Custom Animatable View Properties 184 Keyframe View Animation 185 Transitions 188 Implicit Layer Animation 190 Table of Contents | v
📄 Page 8
Animatable Layer Properties 191 Animation Transactions 191 Media Timing Functions 193 Core Animation 194 CABasicAnimation and Its Inheritance 194 Using a CABasicAnimation 196 Springing Animation 199 Keyframe Animation 200 Making a Property Animatable 201 Grouped Animations 203 Freezing an Animation 206 Transitions 207 Animations List 209 Actions 211 What an Action Is 211 Action Search 211 Hooking Into the Action Search 213 Making a Custom Property Implicitly Animatable 216 Nonproperty Actions 217 Emitter Layers 219 CIFilter Transitions 224 UIKit Dynamics 226 The Dynamics Stack 226 Custom Behaviors 230 Animator and Behaviors 232 Motion Effects 239 Animation and Layout 240 5. Touches. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 Touch Events and Views 244 Receiving Touches 246 Restricting Touches 248 Interpreting Touches 249 Gesture Recognizers 253 Gesture Recognizer Classes 253 Gesture Recognizer Conflicts 259 Gesture Recognizer Delegate 261 Subclassing Gesture Recognizers 263 Gesture Recognizers in the Nib 266 3D Touch Press Gesture 266 Touch Delivery 268 Hit-Testing 269 vi | Table of Contents
📄 Page 9
Performing Hit-Testing 270 Hit-Test Munging 271 Hit-Testing for Layers 272 Hit-Testing for Drawings 273 Hit-Testing During Animation 274 Initial Touch Event Delivery 276 Gesture Recognizer and View 277 Touch Exclusion Logic 278 Gesture Recognition Logic 279 Part II. Interface 6. View Controllers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 View Controller Responsibilities 286 View Controller Hierarchy 287 Automatic Child View Placement 290 Manual Child View Placement 291 Presented View Placement 293 Ensuring a Coherent Hierarchy 295 View Controller Creation 296 How a View Controller Obtains Its View 297 Manual View 299 Generic Automatic View 300 View in a Separate Nib 301 Summary 304 How Storyboards Work 304 How a Storyboard View Controller Nib is Loaded 305 How a Storyboard View Nib is Loaded 307 View Resizing 307 View Size in the Nib Editor 308 Bars and Underlapping 308 Resizing and Layout Events 312 Rotation 314 Uses of Rotation 314 Permitting Compensatory Rotation 315 Initial Orientation 317 Detecting Rotation 317 View Controller Manual Layout 318 Initial Manual Layout 318 Manual Layout During Rotation 319 Presented View Controller 321 Table of Contents | vii
📄 Page 10
Presentation and Dismissal 321 Configuring a Presentation 324 Communication with a Presented View Controller 330 Adaptive Presentation 332 Presentation, Rotation, and the Status Bar 334 Tab Bar Controller 335 Tab Bar Items 335 Configuring a Tab Bar Controller 337 Navigation Controller 339 Bar Button Items 341 Navigation Items and Toolbar Items 342 Configuring a Navigation Controller 346 Custom Transition 350 Noninteractive Custom Transition Animation 351 Interactive Custom Transition Animation 356 Custom Presented View Controller Transition 361 Transition Coordinator 367 Page View Controller 368 Preparing a Page View Controller 369 Page View Controller Navigation 371 Other Page View Controller Configurations 374 Container View Controllers 375 Adding and Removing Children 376 Status Bar, Traits, and Resizing 380 Previews and Context Menus 382 Storyboards 386 Triggered Segues 390 Container Views and Embed Segues 395 Storyboard References 396 Unwind Segues 397 View Controller Lifetime Events 401 Order of Events 403 Appear and Disappear Events 404 Event Forwarding to a Child View Controller 405 View Controller Memory Management 406 Lazy Loading 407 NSCache, NSPurgeableData, and Memory-Mapping 408 Background Memory Usage 410 7. Scroll Views. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 Content Size 411 Creating a Scroll View in Code 412 viii | Table of Contents
📄 Page 11
Manual Content Size 412 Automatic Content Size with Autolayout 413 Scroll View Layout Guides 414 Using a Content View 416 Scroll View in a Nib 419 Content Inset 422 Scrolling 424 Scrolling in Code 426 Paging 427 Tiling 429 Zooming 430 Zooming Programmatically 432 Zooming with Detail 433 Scroll View Delegate 436 Scroll View Touches 438 Floating Scroll View Subviews 442 Scroll View Performance 443 8. Table Views and Collection Views. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 Table View Controller 448 Table View Cells 449 Built-In Cell Styles 450 Registering a Cell Class 456 Custom Cells 460 Table View Data 466 The Three Big Questions 467 Reusing Cells 469 Table View Sections 471 Section Headers and Footers 472 Table View Section Example 475 Section Index 477 Variable Row Heights 478 Manual Row Height Measurement 479 Measurement and Layout with Constraints 480 Estimated Height 481 Automatic Row Height 482 Table View Selection 484 Managing Cell Selection 485 Responding to Cell Selection 486 Navigation from a Table View 487 Table View Scrolling and Layout 489 Refreshing a Table View 489 Table of Contents | ix
📄 Page 12
Cell Choice and Static Tables 491 Direct Access to Cells 493 Refresh Control 494 Editing a Table View 495 Toggling a Table View’s Edit Mode 496 Edit Mode and Selection 498 Changing a Table View’s Structure 498 Deleting a Cell 500 Deleting Multiple Cells 501 Table View Diffable Data Source 502 Populating a Diffable Data Source 504 Subclassing a Diffable Data Source 507 Changing a Diffable Data Source 508 Pros and Cons of the Diffable Data Source 509 More Table View Editing 510 Rearranging Cells 510 Editable Content in Cells 511 Expandable Cell 513 Table View Swipe Action Buttons 514 Table View Menus 515 Table View Searching 517 Configuring a Search Controller 517 Using a Search Controller 519 Collection Views 524 Collection View Classes 527 Flow Layout 529 Compositional Layout 532 Size, Count, Spacing, and Insets 533 Supplementary Items 536 Multiple Section Layouts 537 Other Compositional Layout Features 538 Collection View Diffable Data Source 541 Basic Cell Manipulation 544 Selecting Cells 544 Deleting Cells 545 Menu Handling 545 Rearranging Cells 546 Custom Collection View Layouts 548 Tweaking a Layout 548 Collection View Layout Subclass 551 Decoration Views 552 Switching Layouts 554 x | Table of Contents
📄 Page 13
Collection Views and UIKit Dynamics 555 9. iPad Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557 Popovers 557 Arrow Source and Direction 560 Popover Size 560 Popover Appearance 561 Passthrough Views 564 Popover Presentation, Dismissal, and Delegate 565 Adaptive Popovers 566 Popover Segues 567 Popover Presenting a View Controller 568 Split Views 569 Expanded Split View Controller (iPad) 570 Collapsed Split View Controller (iPhone) 573 Expanding Split View Controller (Big iPhone) 575 Customizing a Split View Controller 577 Split View Controller in a Storyboard 580 Setting the Collapsed State 582 View Controller Message Percolation 583 iPad Multitasking 586 Drag and Drop 588 Drag and Drop Architecture 589 Basic Drag and Drop 590 Item Providers 593 Slow Data Delivery 597 Additional Delegate Methods 598 Table Views and Collection Views 601 Spring Loading 605 iPhone and Local Drag and Drop 607 Multiple Windows 608 The Window Architecture 608 Scene Creation 609 Window Creation and Closing 611 State Saving and Restoration 612 Further Multiple Window Considerations 616 10. Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 Fonts and Font Descriptors 620 Fonts 620 Symbol Images and Text 624 Font Descriptors 624 Table of Contents | xi
📄 Page 14
Choosing a Font 628 Adding Fonts 628 Attributed Strings 631 Attributed String Attributes 631 Making an Attributed String 634 Modifying and Querying an Attributed String 640 Custom Attributes 641 Drawing and Measuring an Attributed String 642 Labels 643 Number of Lines 644 Wrapping and Truncation 644 Fitting Label and Text 645 Customized Label Drawing 647 Text Fields 647 Summoning and Dismissing the Keyboard 650 Keyboard Covers Text Field 651 Text Field Delegate and Control Event Messages 655 Text Field Menu 658 Drag and Drop 660 Keyboard and Input Configuration 660 Text Views 667 Links, Text Attachments, and Data 668 Self-Sizing Text View 671 Text View and Keyboard 671 Text Kit 672 Text View and Text Kit 673 Text Container 673 Alternative Text Kit Stack Architectures 676 Layout Manager 678 Text Kit Without a Text View 681 11. Web Views. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687 WKWebView 688 Web View Content 689 Tracking Changes in a Web View 691 Web View Navigation 692 Communicating with a Web Page 694 Custom Schemes 697 Web View Previews and Context Menus 699 Safari View Controller 700 Developing Web View Content 701 xii | Table of Contents
📄 Page 15
12. Controls and Other Views. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 UIActivityIndicatorView 703 UIProgressView 705 Progress View Alternatives 707 The Progress Class 708 UIPickerView 709 UISearchBar 711 UIControl 715 UISwitch 719 UIStepper 720 UIPageControl 722 UIDatePicker 722 UISlider 725 UISegmentedControl 728 UIButton 731 Custom Controls 736 Bars 738 Bar Position 739 Bar Metrics 740 Bar and Item Appearance 740 Bar Background and Shadow 742 Bar Button Items 743 Navigation Bar 746 Toolbar 748 Tab Bar 749 Tint Color 752 Appearance Proxy 754 13. Modal Dialogs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757 Alerts and Action Sheets 757 Alerts 758 Action Sheets 761 Alert Alternatives 763 Quick Actions 764 Local Notifications 768 Authorization for Local Notifications 771 Notification Categories 775 Scheduling a Local Notification 778 Hearing About a Local Notification 780 Grouped Notifications 783 Managing Notifications 784 Notification Content Extensions 785 Table of Contents | xiii
📄 Page 16
Today Extensions 788 Activity Views 791 Presenting an Activity View 792 Custom Activities 795 Action Extensions 798 Share Extensions 801 Part III. Some Frameworks 14. Audio. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807 System Sounds 807 Audio Session 809 Category 809 Activation and Deactivation 810 Ducking 811 Interruptions 812 Secondary Audio 813 Routing Changes 814 Audio Player 815 Remote Control of Your Sound 818 Playing Sound in the Background 821 AVAudioRecorder 822 AVAudioEngine 823 MIDI Playback 829 Text to Speech 829 Speech to Text 830 Further Topics in Sound 833 15. Video. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835 AVPlayerViewController 836 Other AVPlayerViewController Properties 838 Picture-in-Picture 840 Introducing AV Foundation 842 Some AV Foundation Classes 842 Things Take Time 843 Time Is Measured Oddly 846 Constructing Media 847 AVPlayerLayer 852 Further Exploration of AV Foundation 855 UIVideoEditorController 855 xiv | Table of Contents
📄 Page 17
16. Music Library. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859 Music Library Authorization 859 Exploring the Music Library 861 Querying the Music Library 862 Persistence and Change in the Music Library 866 Music Player 866 Setting the Queue 867 Modifying the Queue 869 Player State 869 MPVolumeView 871 Playing Songs with AV Foundation 871 Media Picker 874 17. Photo Library and Camera. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877 Browsing with UIImagePickerController 877 Image Picker Controller Presentation 878 Image Picker Controller Delegate 879 Dealing with Image Picker Controller Results 881 Photos Framework 882 Querying the Photo Library 884 Modifying the Library 885 Being Notified of Changes 888 Fetching Images 889 Editing Images 893 Photo Editing Extension 898 Using the Camera 900 Capture with UIImagePickerController 900 Capture with AV Foundation 903 18. Contacts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 909 Contact Classes 909 Fetching Contact Information 911 Fetching a Contact 911 Repopulating a Contact 912 Labeled Values 913 Contact Formatters 913 Saving Contact Information 915 Contact Sorting, Groups, and Containers 915 Contacts Interface 916 CNContactPickerViewController 917 CNContactViewController 919 Table of Contents | xv
📄 Page 18
19. Calendar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 923 Calendar Database Contents 924 Calendars 924 Calendar Items 925 Calendar Database Changes 925 Creating Calendars, Events, and Reminders 926 Events 926 Alarms 927 Recurrence 928 Reminders 929 Proximity Alarms 931 Fetching Events and Reminders 931 Calendar Interface 932 EKEventViewController 933 EKEventEditViewController 934 EKCalendarChooser 934 20. Maps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 937 Map Views 937 Displaying a Region 938 Scrolling and Zooming 939 Other Map View Customizations 941 Map Images 941 Annotations 942 Customizing an MKMarkerAnnotationView 943 Changing the Annotation View Class 945 Custom Annotation View Class 947 Custom Annotation Class 948 Annotation View Hiding and Clustering 949 Other Annotation Features 951 Overlays 952 Custom Overlay Class 954 Custom Overlay Renderer 956 Other Overlay Features 958 Map Kit and Current Location 959 Communicating with the Maps App 961 Geocoding, Searching, and Directions 962 Geocoding 963 Searching 964 Directions 965 xvi | Table of Contents
📄 Page 19
21. Sensors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 967 Core Location 968 Location Manager and Delegate 968 Location Services Authorization 969 Location Tracking 973 Where Am I? 976 Continuous Background Location 977 Location Monitoring 978 Heading 983 Acceleration, Attitude, and Activity 984 Shake Events 985 Using Core Motion 986 Raw Acceleration 987 Gyroscope 991 Other Core Motion Data 996 Part IV. Final Topics 22. Persistent Storage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1005 The Sandbox 1005 Standard Directories 1005 Inspecting the Sandbox 1006 Basic File Operations 1007 Saving and Reading Files 1008 File Coordinators 1014 File Wrappers 1014 User Defaults 1015 Simple Sharing and Previewing of Files 1018 File Sharing 1018 Document Types and Receiving a Document 1018 Handing Over a Document 1021 Previewing a Document 1022 Quick Look Previews 1023 Document Architecture 1024 A Basic Document Example 1026 iCloud 1031 Document Browser 1033 Custom Thumbnails 1036 Custom Previews 1037 Document Picker 1038 XML 1039 Table of Contents | xvii
📄 Page 20
JSON 1041 Coding Keys 1043 Custom Decoding 1044 SQLite 1046 Core Data 1047 PDFs 1054 Image Files 1055 23. Basic Networking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1059 HTTP Requests 1059 Obtaining a Session 1059 Session Configuration 1060 Session Tasks 1062 Session Delegate 1064 HTTP Request with Task Completion Function 1066 HTTP Request with Session Delegate 1068 One Session, One Delegate 1070 Delegate Memory Management 1071 Session and Delegate Encapsulation 1072 Downloading Table View Data 1076 Background Session 1079 On-Demand Resources 1081 In-App Purchases 1084 24. Threads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1089 Main Thread 1089 Background Threads 1091 Why Threading Is Hard 1093 Blocking the Main Thread 1094 Manual Threading 1097 Operation 1099 Grand Central Dispatch 1103 Commonly Used GCD Methods 1106 Synchronous Execution 1106 Dispatch Groups 1107 One-Time Execution 1108 Concurrent Queues 1109 Checking the Queue 1110 App Backgrounding 1110 Background Processing 1113 xviii | Table of Contents
The above is a preview of the first 20 pages. Register to read the complete e-book.

💝 Support Author

0.00
Total Amount (¥)
0
Donation Count

Login to support the author

Login Now
Back to List