JHGradientView.swift – Gradient View editable in Xcode Interface Builder

JHGradientView is a swift UIView subclass that adds the ability to modify a gradient using the Interface Builder within Xcode.

This class is very useful for applying gradients to interfaces- a subtle gradient can look great on view backgrounds, menus, table cells, collection view cells, buttons, and more.

By utilizing @IBDesignable and @IBInspectable, this class adds additional property items to Interface Builder, allowing you to make adjustments and see how the interface will look without running the app on a simulator or device.

A curiosity of gradients and the @IBDesignable feature lead to the creation of my Gradient Maker app.

View post on imgur.com

https://gist.github.com/jhays/785983dbea549c0b29e1

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *