Speaker Deck

Turning UIKit Inside Out

by Benjamin Encz

Published May 27, 2016 in Programming

UIKit is an extremely powerful framework that has enabled developers to build sophisticated apps throughout the last couple of years. However, UIKit's architecture has not kept up with the changes in the iOS developer community, which are mostly driven by the introduction of Swift. Swift developers tend to favor a declarative programming style, UIKit requires the opposite. UIKit mostly works on delegates and callback blocks that provide data to the framework and influence what is rendered on the screen. Forcing our Swift code into this architecture often results in code that is difficult to understand & maintain. Further, UIKit makes it unfortunately easy to write bad code. What if we could turn this inside out? What if the view layer was simply a mapping of our data layer, not requiring delegation or callbacks?