About the Builder Pattern in Objective-C

When dealing with complex object creation in an iOS application you may feel the need for a cleaner and more fluent approach.

During my latest development my colleague @alexiskinsella set up a pattern based on providers in order to mimic the factory behaviour we often find in languages such as Java.

Recently, in the occasion of a side project, I am studying a slightly different approach, based on this article by Matthias Wessendorf.

What I am willing to do is an image builder which creates UIImages on which a GPUImageFilter is applied.

The result I came to is as follows:

The Builder itself (implementation)

The Configuration object (header)

 Using a Builder with an inline Configuration

This should make for a quite readable code with a reduced number of lines of code in the method that invokes the builder.