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.
Initial support for Interface Builder:![image](https://cloud.githubusercontent.com/assets/590579/17939406/e530138e-6a00-11e6-97e7-ca952e3fdec8.png)
Created a new
UIImageView
subclass, calledIconView.swift
. This class uses 2 IBInspectable attributes,iconName
andiconColor
. TheiconName
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'simage
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.