The Problem
When using Autolayout in a team there is nothing worse than storyboard/nib conflicts. While not impossible to fix, regressions are inevitable. Recently my team in an effort to remove those conflicts(or at least make them a snap(ha, get it?) to fix we decided to give Snapkit a try.
Snapkit
Snapkit is the swift version of the popular Autolayout wrapper Masonry. Our teams mission at the moment is to slowly write everything that once was Objective-C into swift and Snapkit fits perfectly. We were seeing some performance hits with dequeuing complex cells in nibs/storyboards.
Adding Playgrounds
Setting up a Playground to use while building up your viewController doesn't take much. We just followed the simple tutorial here.
Conclusion
- Pros
- Conflicts are easily manageable
- Powerful/Better than the GUI used for Autolayout(with Playgrounds)
- Easy to write
- Cons
- managing file size is a bit of a pain
While minimizing clutter is a bit of a pain especially with complex layouts. It is alot more flexible and easy to make small tweaks without worrying about breaking everything.
I would recommend it to anyone who is tired of storyboard/nib conflicts or just don't want to use them altogether.
When combined with Playgrounds it becomes an even more powerful tool that me and my team are going to continue with for the foreseeable future.