home-assistant / Iconic

:art: Auto-generated icon font library for iOS, watchOS and tvOS
Apache License 2.0
1.58k stars 86 forks source link

Interface builder support. Closes #4 #41

Closed dzenbot closed 8 years ago

dzenbot commented 8 years ago

Initial support for Interface Builder: image

Created a new UIImageView subclass, called IconView.swift. This class uses 2 IBInspectable attributes, iconName and iconColor. The iconName attribute expects a string, internally converted to an enum, to be able to use Iconic's image converter. The image is then assigned to its super's image property.

This is still a prototype, specially because I need to figure out a nice way to convert String to enum, without having to create yet another long function using SwiftGen. It seems like Swift 3 brings a few new features to do this with a simple function. I will integrate this class into Iconic once I port most of the APIs to a more Swifty and Swift 3 compatible interface, just like in #26.

dzenbot commented 8 years ago

Closes #4