In Xcode 9 and Swift 4 I always get this warning for some IBInspectable
properties:
@IBDesignable public class CircularIndicator: UIView {
// this has a warning
@IBInspectable var backgroundIndicatorLineWidth: CGFloat? { // <-- warning here
didSet {
backgroundIndicator.lineWidth = backgroundIndicatorLineWidth!
}
}
// this doesn't have a warning
@IBInspectable var topIndicatorFillColor: UIColor? {
didSet {
topIndicator.fillColor = topIndicatorFillColor?.cgColor
}
}
}
Is there a way to get rid of it ?