
In UIView, there is a method called prepareForInterfaceBuilder, which does exactly what it says on the tin – override the method to set properties only relevant in Interface Builder. Luckily, that exists, as I found out later. What I needed was a way to set a property, but only from within Interface Builder.
#PAINTCODE APPS HOW TO#
I will also go into setting colors, and finally about how to deal with views that depend on dynamic runtime data to draw themselves.įirst, let’s create a simple graphic in PaintCode. In this blog I will explain an effective and simple method to draw PaintCode graphics in a way where you can see what you’re doing in Interface Builder, using the relatively new annotation. Stylekit: Change the design of your app in seconds.
#PAINTCODE APPS CODE#
With PaintCode you can create an app that is truly resolution-independent, using code (instead of large number of image assets) to draw a user interface.

One thing that I personally struggled with for a while now was how to use them effectively in combination with Interface Builder, the UI development tool for iOS and OSX apps. PaintCode is a vector drawing app that instantly generates Objective-C, Swift and C drawing code. The benefits of this are vastly reduced app installation size – no need to include three resolutions of the same image for every image – and seamlessly scalable graphics.

Every self-respecting iOS developer should know about PaintCode by now, an OSX app for drawing graphics that don’t save as images, but as lengths of code that draw graphics.
