Programming iOS 13 - Programming Ebook

Latest

Download Programming Ebook

Tuesday, August 25, 2020

Programming iOS 13

Programming iOS 13
Programming iOS 13



Book Details 
             TitleProgramming iOS 13
      ISBN-10942878347
         AuthorMatt Neuburg
    Language: English
        SubjectSwift / Computers & Technology / Programming / Apple Programming
No. of pages: 1024
         Format: PDF

Dive Deep into Views, View Controllers, and Frameworks by Matt Neuburg

Preface 

With the arrival of Swift 5 in early 2019, the stamp of maturity has been placed upon the Swift language. When Swift was introduced to the public in 2014, it was a sort of second-class citizen. The Cocoa frameworks that give an iOS app its functionality expect to be spoken to in Objective-C, and several megabytes of libraries had to be included in every Swift app, effectively containing the whole of the Swift language and translating everything into Objective-C. But Swift 5 introduces ABI stability, which means that, since iOS 12.2, the Swift language has become part of the system. Swift is now on a par with Objective-C, and Swift apps are smaller and faster.

Swift is the programming language used throughout this book. Still, some awareness of Objective-C (including C) can be useful. The Foundation and Cocoa APIs are still written in C and Objective-C. In order to interact with them, you might have to know what those languages would expect.

The Scope of This Book

Programming iOS 13 is the second of a pair with my other book, iOS 13 Programming Fundamentals with Swift; it picks up where the other book leaves off. If writing an iOS program is like building a house of bricks, iOS 13 Programming Fundamentals with Swift teaches you what a brick is and how to handle it, while Programming iOS 13 hands you some actual bricks and tells you how to assemble them.

So this book, like Homer’s Iliad, begins in the middle of the story. The reader is expected to jump with all four feet into views and view controllers. Topics such as the Swift programming language, the Xcode IDE, including the nature of nibs, outlets, and actions, and the mechanics of nib loading, and the fundamental conventions, classes, and architectures of the Cocoa Touch framework, including delegation, the

Preface

responder chain, key–value coding, key–value observing, memory management, and so on, were all taught in iOS 13 Programming Fundamentals with Swift.

So if something appears to be missing from this book, that’s why! If you start reading Programming iOS 13 and wonder about such unexplained matters as Swift language basics, the UIApplicationMain function, the nib-loading mechanism, Cocoa patterns of delegation and notification, and retain cycles, wonder no longer! I don’t explain them here because I have already explained them in iOS 13 Programming Fundamen‐ tals with Swift. If you’re not sufficiently conversant with those topics, you might want to read that book first; you will then be completely ready for this one.

Here’s a summary of the major sections of Programming iOS 13:

  • Part I describes views, the fundamental units of an iOS app’s interface. Views are what the user can see and touch in an iOS app. To make something appear before the user’s eyes, you need a view. To let the user interact with your app, you need a view. This part of the book explains how views are created, arranged, drawn, layered, animated, and touched.

  • Part II starts by discussing view controllers. Perhaps the most important aspect of Cocoa programming, view controllers enable views to come and go coherently within the interface, allowing a single-windowed app running on what may be a tiny screen to contain multiple screens of material. View controllers are used to manage interface and to respond to user actions; most of your app’s code will be in a view controller. This part of the book talks about how view controllers work, and the major built-in types of view controller that Cocoa gives you. It also describes every kind of view provided by the UIKit framework — the primary building blocks with which you’ll construct an app’s interface.

  • Part III surveys the most commonly used frameworks provided by iOS. These are clumps of code, sometimes with built-in interface, that are not part of your app by default, but are there for the asking if you need them, allowing you to work with such things as sound, video, user libraries, maps, and the device’s sensors.

  • Part IV wraps up the book with some miscellaneous but significant topics: files, networking, threading, and how to implement undo.

  • Appendix A summarizes the basic lifetime event messages sent to your app.

  • Appendix B catalogs some useful utility functions that I’ve written. My example code takes advantage of these functions, so you should keep an eye on this appendix, consulting it whenever a mysterious method name appears.

  • Appendix C is an excursus discussing an often misunderstood aspect of iOS pro‐ gramming: asynchronous code. 


No comments:

Post a Comment