The iOS Huddle #0
Monday, August 15, 2016
The iOS Huddle is our monthly roundup of the best links shared in the Black Pixel iOS team’s Slack channel.
From BPXL Craft
In case you missed them, here are a couple of recent iOS-centric articles from BPXL Craft:
Core Data is an often misunderstood beast. It’s difficult to know exactly how it functions behind the scenes. Michael Gachet does a deep dive into some issues we discovered when using NSFetchedResultsController in a recent project and provides several solutions for addressing them. Some things are not always as they seem.
tvOS App Development Challenges: Focus Effects & Infinite Carousel
tvOS introduced a new interaction paradigm with the Apple TV Remote-driven focus engine. Building great app interfaces presents a whole new host of challenges to even skilled UIKit developers. Jared Sinclair describes some strategies we used for crafting a polished tvOS experience.
From Around the Watercooler
While protocol-oriented programming is a great new strategy for building software, good old object-oriented design is still the norm for many projects, especially for anyone still using Objective-C. One common pitfall when using inheritance is forgetting to call the super implementation inside of an overridden method. Klaus-Peter Dudas has a great explanation of how to deal with this in Objective-C by using the NS_REQUIRES_SUPER macro.
“No Matching Provisioning Profiles Found”
Seeing these words can feel like a punch in the gut. Code signing and device provisioning are some of the most mysterious aspects of iOS development. Fortunately, poking the black provisioning box until something starts working will be a thing of the past with Xcode 8. In his article Code Signing in Xcode 8, Jay Graves discusses how the newly redesigned Automatic Code Signing, Customized Code Signing, and Report Navigator will allow all of us to breath a collective sigh of relief and get back to building our apps.
Animating Blur Radius
Filip Radelic explains how to use the new UIViewPropertyAnimator in iOS 10 to enable fine-grained control when animating the blur radius of a UIVisualEffectView. As a bonus, Filip also describes how to open a Swift Playground directly on an iPad.
A Case for No-Case Enums?
Swift provides some powerful new tools that change the way we write software. We were surprised to learn that it’s possible to create no-case enums for things like singletons and namespaces. This looks like a much cleaner way than creating a struct with a private init method. Erica Sadun goes into detail about why you’d create no-case enums with examples of how to apply this powerful technique in practice.
Measurements and Units in Foundation
There are certain things that most developers should never try to write themselves. Cryptography and datetime functions are a couple of examples that have long had deep SDK support. Now we can add units of measurement and conversions between them to the list. Ole Begemann describes how Foundation has been updated to allow easy locale-specific distance conversions for a recent bicycle tour.
Closures Capture Semantics, Part 1: Catch Them all!
Swift brought us much easier ways to use closures in our code. In fact, it would be a challenge to try not using them. Knowing how variables with different scopes are captured and handled by ARC is very important for writing memory-efficient, well-behaved software. Using the apropos example of capturing Pokemon, Olivier Halligon breaks down the fundamentals of memory management in Swift.
What Every Computer Scientist Should Know About Floating Point
Math is hard. Floating-point math is harder. This reprint of a document originally written by David Goldberg provides an extremely thorough tutorial on what floating-point numbers are, potential issues that arise in working with them, and some examples of how to support them. If you have ever wondered exactly how floating-point numbers work, then grab a pot of coffee and get ready to have your mind blown.