Keeping code in scope using the Applicable Protocol

Whenever I write code that’s mutating properties or calling methods on an initialized objects / creating new instances of an object, I like to wrap it in a closure to build a coherence between the object and the changes made to it, also I think it adds a very good amount of readability. There’s a Swift Protocol I’ve created for this which I called Applicable as its one and only method is called apply.

Read More →

Writing clean UITableViewController code

When dealing with UITableViews there’s often the challenge of handling different types of UITableViewCells while still keeping your code D.R.Y and readable. I want to show you a simple way to keep your UITableViewDataSource and -Delegate clean and still be able to alter different numbers and types of cells in your UITableView in an elegant way. If you can’t wait to try it out, please feel free to download the source code and sample app here.

Read More →