EnumArray in Swift

So today I happened to need something which is like an Array but can’t grow boundless. And I also need a named lookup, like what Dictionary does. But I don’t want to deal with Optional types. I want it to be guaranteed to be populated with all the data during the init time, so lookups can never be nil. Does such a thing already exists? In Swift I mean. I guess not, so obviously the next step to make such a thing. I’m calling it EnumArray.

A minimal implementation of State and Binding with Swift

One of my most favorite thing about SwiftUI is neither the declarative API nor the mystical fancy syntax but rather the philosophy of one directional flow of data and event. I’ve been trying to put that philosophy into practice for quite a while now with whatever framework I use.

Adapters in Swift

Any professional software developer knows that the simplest solution in building software is sometimes just to wrap an existing solution with the expected client interface and be done with it. This pattern is so common they even gave it a name, Adapter Pattern.

Simple UIViewController Transitions

When it comes to UIViewController transitions there are many articles and videos out there that talk more in depth about the sophisticated solutions provided by UIKit and that is probably for the good reason that those UIKit APIs are very complicated to understand. But UIKit also provides a simpler API for simpler needs. And I think nobody talks enough about it either because it is so simple that everyone assumes that everyone knows how it works or that it “just” works somehow that nobody cares about the details of how it’s intended to be used.

Data-Driven UI with UIKit

Preserving the theme of simplicity let’s make use of one of my favorite method from UIKit - layoutSubviews and build a data driven UI system.