thehung111 / NHRangeSlider

A custom range slider in Swift
https://thehung111.github.io/NHRangeSlider/
MIT License
157 stars 45 forks source link

Property cannot be marked @IBInspectable because its type cannot be represented in Objective-C #22

Open ahsolanki opened 6 years ago

ahsolanki commented 6 years ago

I am facing issue in following function:

/// stepValue. If set, will snap to discrete step points along the slider . Default to nil @IBInspectable open var stepValue: Double? = nil { willSet(newValue) { if newValue != nil { assert(newValue! > 0, "NHRangeSlider: stepValue must be positive") } } didSet { if let val = stepValue { if val <= 0 { stepValue = nil } }

        updateLayerFrames()
    }
}

At this line @IBInspectable open var stepValue: Double? = nil , I face error like, Property cannot be marked @IBInspectable because its type cannot be represented in Objective-C