A storyboard is worth a thousand words

How @IBDesignable and @IBInspectable can help you speed up iOS front-end development

If you’re used to work in Sketch and you’ve never approached any kind of software development, you should be used to the concept of immediacy and the fact that the changes you make to your design apply directly and straightaway to your artboard. There’s no time gap in between your action and your eyes seeing the result.

In the code world though this is often not the case and people working in it accept the fact that some undefined time (seconds or many minutes) will pass in between a change in the code and the output ready to appear in front of their eyes.

This time gap is mainly due to the code being slowly compiled by the program used to develop and build the software itself.

The purpose of this post is to help you create a UI component (for example a button) and remove that annoying wasted time in between from when you edit to when you see the result.

You’re going to achieve this is by using @IBDesignable and @IBInspectable.

I’ll explain what they are in a moment, but for now, just know that these 2 friends combined serve the purpose of enhancing efficiency by replacing an interface that requires you to type code with one made of simple UI controllers that you can see and use directly to tweak your design in Xcode.