Recent Articles

Swift comes with five access-level modifiers: open, public, internal, fileprivate and private. The internal modifier leads to entities being available for use only within their defining module. It’s a default modifier but it starts getting interesting only once we split our codebase into modules.

In this article, we’ll see how to provide an ability to inject a framework’s data structure into the framework’s classes, while at the same time keeping its internals hidden.

One of the issues introduced by storyboards is that they make it impossible to pass dependencies to view controllers in initializers. I proposed an API modification in past that would allow for exactly that, but alas, it doesn’t seem to be high on the priority list for UIKit. I recently came up with a new approach leveraging code generation which I’m excited to show you today.

If you use Interface Builder along with @IBDesignable attribute you may have noticed that Xcode sometimes builds your project even though you didn’t trigger a build. This is because it needs to compile views marked with @IBDesignable to be able to render them in Interface Builder. What's problematic is that these builds seem to occur a bit too often.

I spent some time recently trying to optimize build times of a project I contribute to.
To my surprise, the knowledge needed to do that was scattered around many blog posts and tweets.
So, I decided to do something about that by putting everything I knew and learned in a single document.
It's available on GitHub here.