Subscribe And Get 4 FREE Power Swift Playgrounds With The Latest Swift 3.0 Syntax

Get Free Access Now

You'll learn: Error Handling with Swift 3.0, Protocol-Oriented Programming, Reference vs Value Types, and Higher Order Functions

Refactoring to: Creation Method

As I spoke at and attended several conferences last month, the book Refactoring to Patterns (affiliate link) kept coming up again and again, especially in my favorite talks. I finally have a little time to read it (before all the after-WWDC-announcement craziness ascends), and I’d like to document the patterns I like for future reference. I also found it better to remember the information by translating the Java in the book to Swift. The first pattern is the Creation Method.

Protocol-Oriented Views in Swift

I recently gave a talk on Practical Protocol-Oriented-Programming(POP💥) in Swift. The video is still being processed. Meanwhile, here is the written-up version of the POP View part of the talk for reference (for me and anyone else!).

Protocol-Oriented-Networking in Swift

I recently gave a talk on Practical Protocol-Oriented-Programming (POP💥) in Swift. The video is still being made. Meanwhile, here is the written-up version of the POP Networking part of the talk for reference (for me and anyone else!).

Swift Alternatives to C-style for-loops

Starting in Swift 3.0, C-style for-loops will be gone from Swift! Last week, I talked to an iOS developer who was upset by this (it is a long-held habit after all!) and was confused by what to use as an alternative. @twostraws did a great write-up on the new Swift 2.2 features and what to use instead, so I’m going to write it down here for my own (and your) reference.

Swift: Money with Phantom Types 👻

I’ve seen Phantom Types before, including in this objc.io article about Phantom Types and in conference talks, but while I like the idea of Phantom Types and think they’re cool and interesting, I haven’t actually used them ever in my own code. Mostly, because it’s not yet natural for me to see a problem and think “Ah, Phantom Types would be the perfect solution!” But this example caught my eye...

Swift: The 😎 Case of An Enum With No Cases

Earlier today, I wrote about all the unconventional ways I use extensions in Swift to make my code more readable. This somehow triggered an interesting discussion on Twitter around Swift naming conventions. I won’t go into detail on that here – you can read the full discussion yourself if you’d like. But I did learn something super cool...