This is the #28 article.



Article

DRYing up duplicate code into helper functions

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.


#311: Round Corner Improvements ✅

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.


WWDC 2017

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!


The surprising awesomeness of Grouped Dictionaries


The Unexpected Joy of Vector Images in iOS 11

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.


The startling uniquing of Swift 4 dictionaries

As you’ve probably heard, Swift 4 now has multiline strings.


Catching Leaky View Controllers Without Instruments

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?


Exploring the new String API in Swift 4

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

Enums as configuration: the anti-pattern

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.



Slide

Chris Lattner on the Realm WWDC 2017 Swift panel

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.)



Random

Swift Migrator

This library implements functionality for the Swift 4 Migrator.


Compiler Explorer



Podcast

31. Swift 4

From Fatal error.


15: What’s New in Swift 4 (Part 2)

Some great new features and improvements. 14: What’s New in Swift 4 (Part 1).


17: Testing Swift


Episode 150 – MTJC Sesquicentennial

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.



If you have any questions and feedbacks about a kind of new Swifty week, feel free to ask me :+1: You can catch me on Twitter and Github.

Have a lovely week <3