Have you tried to create a custom control in older versions of Xcode? It’s not that easy. What makes it so hard is that you couldn’t see your design in the Interface Builder. Every time you want to review the design changes, you can only test the control in the simulator. That’s troublesome. You would probably need to spend hours and hours on designing a single component.
With the release of Xcode 6, Apple introduced a new feature known as IBDesignable and IBInspectable for developers to build custom controls and allowed us to live preview the design right in the Interface Builder. Quite obviously, this is a huge productivity benefit.
In this tutorial, I will give you an introduction to IBDesignable and IBInspectable, and show you guys how to take advantage of the new feature. There is no better way to elaborate a feature than creating a demo. So we will build a custom interface called “Rainbow” together.