How to fix “'@IBInspectable' attribute is meaningless on a property that cannot be represented in Objective-C” warning
问题 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