Unless you’re the type of person who likes to write everything themselves, chances are you’ll have a lot of dependencies in your code on classes from external frameworks. These don’t often fit within your personal (or company’s) API guidelines or architecture. You also can’t apply dependency inversion as easily as with your own classes.

Since in Swift you can extend any type (including types from other frameworks) with whichever methods or computed variables you please, controlling external types is easy.

The approach I use for this is wrapping the external classes into a protocol I control. It boils down to extending the external class to conform to one of your protocols.

Read More »


One of the cool things UIStackView can do for you is make it easy to dynamically update your app’s user interface while it’s running, with smooth animations and not a lot of code. My recent talk at iOSDevCamp DC covered some techniques. Natasha the Robot wrote a couple of great posts based on my talk, and today I’m going to talk about another unexpected (to me?) use of stack views.

Read More »


RxSwift is one of those things you have to try yourself to really start appreciating. It’s the one piece of the puzzle that I was missing to glue all the patterns like MVVM, VIPER, Coordinators/Routing.

It’s hard to express what RxSwift really is, because it does a lot. In general it serves as a great observer pattern with a mix of functional and reactive programming. It’s important to say what it isn’t and it isn’t Functional Reactive Programming in it’s original definition. It’s heavily inspired on FRP, so we can say that it contains Reactive and Functional features.

If you don’t know what FRP is, don’t worry for now – you’ll be able to discover it yourself in this tutorial. You’ll gradually learn what Functional and Reactive mean in the FRP.

Read More »


Core Data has a popular opinion of being hard to use, especially in concurrent environments. Why is that the case? First, it truly is complex because it solves a hard problem. Second, until WWDC16 Apple haven’t really said how to best set up the Core Data stack. There were many options, each with its own issues, that we had to choose from.That’s why I’m super happy that things get clearer in iOS 10 with the introduction of NSPersistentContainer.

Read More »