I have an Icon drawn via PaintCode. I need to change his color in XCode, programmatically.
On PaintCode, I set a Variable "ChevronColor" to the Stroke Color.
For now I have:
@IBDesignable
class IconClass: UIView {
override func draw(_ rect: CGRect) {
StyleKit.drawIcon(frame: self.bounds, resizing: .aspectFit)
}
}
But I would like to add kind of this, to be able to set the color of the icon.
@IBInspectable
var ChevronColor : UIColor {
didSet (newColor) {
setNeedsDisplay()
}
}
I don't know how to do.
After exporting the StyleKit file, I excepted to have this method available in the stylekit file, but it's not the case:
StyleKit.drawIcon(frame: self.bounds, resizing: .aspectFit, chevronColor: self.ChevronColor)