Subscribe And Get 4 FREE Power Swift Playgrounds With The Latest Swift 2.0 Syntax
You'll learn: Error Handling with Swift 2.0, Protocol-Oriented Programming, Reference vs Value Types, and Higher Order Functions
One of the first things I immediately noticed was missing from Swift was the NSStringFromClass replacement. I like to use the class name for my TableViewCell identifiers, and then just NSStringFromClass to dequeue the cells to avoid spelling issues. Now there is a Swift solution!!!
One of the best things about Swift is that it has built-in features that allows for a lot of immutability in the architecture, making our code a lot cleaner and safer (highly recommend this talk on the subject if you haven’t seen it already!). But what should you do when you actually need some mutability?
In my blog post on Constructor Injection, I had an example of a struct with a property that needed to be read externally but written only internally. I initially wrote the code like this...
Sometimes, the best solution is dependency injection via the initializer. Here's an example....
This is going to be the most challenging and exciting year yet!
One of the big benefits of testing is that you end up with a much better code design. Including using custom subscripts in Swift!
Someone emailed me recently asking me to compile a list of Swift Programming Books. While I have not read all of these books, they have come up for me a few times, and I know they're from good Swift developers. So here is the list...
When I first saw the term “associated types” on Twitter and around the inter-webs, I honestly just ignored it. It seemed very high level. So I’d like to write down my initial understanding of Protocols with Associated Types – mostly what they are and how to use them.
I’ve fallen in love with Protocol-Oriented Programming (POP), but of course, I’m new to it and still learning. One of my favorite use-cases for POP is with MVVM.
I wrote about it back in August – read it if you’d like to understand the problem more. Since then, I have of course found an even better way of applying POP to MVVM!
When I was first starting out as an iOS developer, I ran into an issue that every iOS developer faces sooner rather than later: How to Download Images Asynchronously. After I figured it out (or so I thought), I of course blogged about it. But although my solution worked at first glance, it has a lot of issues: