UIViewInspectable 0.0.1

UIViewInspectable 0.0.1

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Mar 2015
SPMSupports SPM

Maintained by Michael Kamphausen.



  • By
  • Michael Kamphausen

UIView extension for setting cornerRadius, borderWidth or borderColor in Interface Builder as IBInspectable. Inspired by Nate Cook's NSHipster article "IBInspectable / IBDesignable".

Installation

Or copy UIViewInspectable.swift to your project in case you need to support iOS 7.

Usage

Interface Builder now displays new inspectable attributes for every UIView and derived objects in the Attributes Inspector. Corner is Circle is shorthand for setting the corner radius to half of the view's height or width.