MVC Composition

In this post i’ll try to explain my point of view on an old architecture pattern: Model View Controller.

All iOS developers know MVC. All iOS developers also know why it’s called “Massive View Controllers”.

I’ll try to explain some of the techniques i use to write simple reusable ViewControllers and how i use composition to assemble them as screens of the app.

Written on November 16, 2018

Swift Formatting

Following my last post (over two years ago), i now use Swift Format from Nick Lockwood.

It’s a great tool that makes sure formatting is identical for all the team. Makes merging much simpler. I use it as a Xcode Source editor extension.

It works whether you like 1TBS or Allman Style.

SwiftFormat on GitHub

Written on November 12, 2018

Swift AllMan Style formatting

Recently i read this article from Erica Sadun: swift-bracing

I’ve always preferred Allman Style rather than 1TBS Style.

For objective-C i was using BBUncrustify to automatically format my code to Allman Style on save.

However, neither clang-format nor Uncrustify work at the moment for Swift langage.

I found this project called Swimat which does Swift Source code formatting. I published a quick hack to support Allman Style:

Swimat fork with Allman style option: https://github.com/giln/Swimat.

Written on January 12, 2016