Share E-Book
Scan to open this page

Scan with your phone to open this page

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.

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A comprehensive, code-rich guide for iOS developers who already know Swift and Xcode basics, this book systematically explains how to build real-world iOS 13 apps by mastering views, view controllers, and Apple's frameworks—from drawing and animation to gestures, layout, and beyond. 【Book Arc】 - **Opening (~0%–10%)**: Establishes the foundational concept of the view hierarchy, explaining how views are arranged, drawn, and layered, including the critical role of size classes and layout margins in adapting to different devices and orientations. - **Early (~10%–23%)**: Dives into practical view configuration, covering Auto Layout constraints, custom layout guides, and image handling—including resizable images with cap insets, tiling, and stretching—plus visual effects like blur and vibrancy for modern interface design. - **Early (~23%–32%)**: Explores drawing and layers in depth, showing how to subclass UIView for custom drawing, build complex visual compositions with CALayer (like a 3D compass), and master layer features such as shadows, masks, and transforms for polished visuals. - **Middle (~32%–42%)**: Focuses on animation, explaining both block-based UIView animations and property animators, covering duration, delay, timing curves, and the underlying Core Animation mechanics—including implicit layer animations and how to customize them via action objects. - **Middle (~42%–48%)**: Transitions to touch handling and gesture recognition, detailing how UIGestureRecognizer subclasses work, their target–action dispatch model, and how to manage discrete versus continuous gestures for interactive interfaces. 【Key Takeaways】 - **View hierarchy dictates drawing order and interaction** (Opening): Sibling subviews draw in order, so earlier siblings appear behind later ones; understanding this is essential for predicting visual layering and touch behavior. (Early) - **Size classes are the key to adaptive layout** (Opening): The combination of horizontal and vertical size classes (regular/compact) tells you whether you're on iPad, iPhone portrait, or iPhone landscape, enabling responsive design without device-specific checks. (Early) - **Custom layout guides beat spacer views** (Early): UILayoutGuide objects participate in Auto Layout like subviews but avoid the overhead of actual views—ideal for evenly distributing views that stay spaced when the superview resizes. (Early) - **Resizable images with cap insets are powerful** (Early): Using `resizableImage(withCapInsets:resizingMode:)` lets you tile or stretch only the interior of an image, preserving corners and edges—critical for buttons, backgrounds, and scalable graphics. (Early) - **Shadows require careful layer configuration** (Early): A layer's shadow won't appear if `masksToBounds` is true; to get both clipping and a shadow, you need a trick—a separate invisible view behind the clipped one with its own shadow layer. (Early) - **Animation duration is really speed** (Middle): A duration of 0 means "use default" (0.2 seconds), and changing distance in the same time changes speed; understanding this helps you design animations that feel natural and intentional. (Middle) - **Implicit animations can be customized via actions** (Middle): By overriding `action(forKey:)` or storing animations in a layer's `actions` dictionary, you can control implicit animations—like forcing a 5-second duration that overrides CATransaction settings. (Middle) - **Gesture recognizers simplify touch handling** (Middle): Each recognizer reports one gesture type via target–action, making any view's touch handling as simple as a control's; discrete gestures (tap) emit one message, continuous ones (pan) emit a series. (Middle) 【Reading Tips】 - **Skim the opening view hierarchy section** if you're comfortable with basic UIView; focus instead on the size class and layout margin details, which are iOS 13-specific and easy to miss. - **Deep-read the drawing and layer chapters** (Early ~23%–32%): These are dense but payoff hugely for custom UI; pay special attention to the shadow/clipping trick and the 3D layer composition example. - **Treat the animation chapter as a reference** (Middle ~32%–42%): You don't need to memorize every API, but understand the difference between block-based animations and property animators, and how implicit animations work under the hood. - **Practice gesture recognizers with code** (Middle ~48%): The target–action pattern is straightforward but subtle; build a small app with multiple recognizers to see how they interact and share touches. - **Skip the table of contents and index** unless you're looking for a specific topic; the book is best read sequentially, as later chapters build on earlier concepts. 【Coverage Limits】 This guide covers the first half of the book (views, drawing, layers, animation, and gestures). Excerpts do not cover view controllers, scroll/table views, text handling, or the framework chapters (sound, video, maps, sensors, files, networking, threads), which appear later in the book.
Excerpt 1
1121 Undo Interface 1123 Shake-To-Edit 1123 Built-In Gestures 1124 Undo Menu 1125 A. Lifetime Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . ....
View in text
Excerpt 2
with respect to drawing, memory, touch detection, and more. Custom UILayoutGuides solve the problem; they can serve the same purpose as spacer views, but the...
View in text
Excerpt 3
ew to cast a shadow. How can that be done? It can’t be done. Figure 3-11 may look like that’s what it’s doing, but it isn’t. It’s a trick. There’s another vi...
View in text
Excerpt 4
o reverse the directionality of the field’s forces. falloff Defines a change in strength proportional to the distance from the center. minimumRadius Specifie...
View in text
Excerpt 5
f the interface to match the current device orientation, to rotate the interface at that moment. This would be useful if, say, your view controller had previ...
View in text
Excerpt 6
me page view controller that I used in my earlier examples, the one that displays Pep Boys; but this time, its view won’t occupy the entire inter‐ face. My w...
View in text
Excerpt 7
r.init(style:.subtitle, reuseIdentifier: reuseIdentifier) } How do I know whether the returned cell is new or reused? Good question! dequeueReusableCell(with...
View in text
Excerpt 8
dexes refer to the state of the table before the deletions. • If you perform insertions, they are performed in ascending index order, and the indexes refer t...
View in text
Tags
AI categories
iOS移动Programming Language
ISBN: 1492074616
Publisher: O’Reilly Media
Publish Year: 2020
Language: English
Pages: 1208
File Format: PDF
File Size: 13.1 MB
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.

Generating text preview…