I did run into an issue with the Swift class lookup as the bundle returned is different when running in IB. I'll probably need to add a method that will allow the user to explicitly set the app name from prepareForInterfaceBuilder.
(Class)swiftClassFromString:(NSString )className {
NSString appName = # had to hard code app name here.
I created my own branch with this functionality in it. I'll get around to creating a pull request at some point if any of you guys are interested in looking at it.
I managed to get Interface Builder to display Classy styled interface elements.
@IBDesignable class ClassyButton: UIButton { override func prepareForInterfaceBuilder() { CASStyler.defaultStyler().filePath = _CASAbsoluteFilePath(#file, "stylesheet.cas") CASStyler.defaultStyler().styleItem(self) } }
I did run into an issue with the Swift class lookup as the bundle returned is different when running in IB. I'll probably need to add a method that will allow the user to explicitly set the app name from prepareForInterfaceBuilder.