yonat / MultiSlider

UISlider clone with multiple thumbs and values, range highlight, optional snap intervals, optional value labels, either vertical or horizontal.
MIT License
494 stars 113 forks source link

Constraint margins becoming mutable. #54

Closed Hartistic closed 4 years ago

Hartistic commented 4 years ago

Unable to change the margin by which the MultiSlider sits within. Right now that value is 32: let margin: CGFloat = 32

Should be able to change the padding around the slider with constants that the developer is okay with.

Problems I encountered when trying to implement this myself: Had to unlock file from cocoa pods in order to change it.

yonat commented 4 years ago

This margin property is not used for changing the padding, but only internally to catch dragging gestures. So you don't need to use it.

To set padding around the control, use the same constrains you would use with any other view.