This is the #28 article.
During a code review, it’s not uncommon for a reviewer to comment, “it looks like there’s some duplication here; can you please DRY this code up?” We often assume it’s clear what this comment means. But it’s worth examining what the reviewer is asking for, and why it’s important.
Today we’re going to talk about corners. Specifically, rounded ones. In iOS 11, Apple has improved the way we can specify and work with the rounding of our views’ corners. Let’s take a look.
On a selfish level, though what I’m most excited about is the new Xcode 9, with all the new features that will make my day-to-day a lot better! We can finally refactor Swift code!
Enter WWDC 2017. In Session 201 “What’s New in Cocoa Touch”, Apple described Asset Catalogs with PDF-backed vector images. All you have to do is tick the “Preserve Vector Data” checkbox.
As you’ve probably heard, Swift 4 now has multiline strings.
One of the well-known techniques for finding memory leaks caused by retain cycles is checking if all view controllers get deallocated when they’re not on screen anymore. This is a process that should be manually repeated before each release but it’s both unpleasant and error-prone. Wouldn’t it be cool if we could learn about UIViewController leaks earlier in the process, during the day-to-day development?
This week, let’s take a look at how it is to work with strings in Swift 4, and how we can take advantage of the new, improved API in various situations.
Updates: Jul 3, 2017
One of the most common patterns I see in software design with Objective-C (and sometimes Swift), is the use of enumeration types (enum) as configurations for a class. For example, passing an enum to a UIView to style it in a certain way. In this article, I explain why I think this is an anti-pattern and provide a more robust, modular, and extensible approach to solving this problem.
Chris Lattner was a guest on a Swift panel during WWDC a few weeks ago. Here are some quotes I found interesting, edited for brevity and clarity. (Iʼm focusing on Chris Lattner here, but the other panelists — Kamilah Taylor, Kevin Ballard, and Jesse Squires — also had interesting things to say. You should really watch the whole thing if you can.)
This library implements functionality for the Swift 4 Migrator.
From Fatal error.
Some great new features and improvements. 14: What’s New in Swift 4 (Part 1).
We begin the episode answering about extending other apps. We follow up with Swift for Visual Studio, transferring apps with subscriptions, CRTC mandated phone unlocking and how they built the Not Hotdog app. We dig into the App Store cleaning rate in Chinese markets. Jaime tells of Erica Sadun’s post about scalable vector are in iOS 11. Pucks: Ultimate Guide to JSON Parsing With Swift 4, JSON with Encoder and Encodable, iOS Simulator Power Ups, Apple celebrates Canadian optimism and diversity with A Portrait of Canada, WWDC videos with transcripts, Public betas are out, Optimizing Collections.
Have a lovely week <3