Open vladpre92 opened 4 years ago
I got the solution for this issue. Just update below code in RangeSeekSlider.swift file
/ Old code let newMinLabelCenter: CGPoint = CGPoint(x: leftHandle.frame.midX, y: leftHandle.frame.maxY + (minLabelTextSize.height/2) + labelPadding) let newMaxLabelCenter: CGPoint = CGPoint(x: rightHandle.frame.midX, y: rightHandle.frame.maxY + (maxLabelTextSize.height/2) + labelPadding)/ //Try this // Updated code to set labels above the handle let YPossitionMin=leftHandle.frame.midY - (minLabelTextSize.height + labelPadding) let YPossitionMax=rightHandle.frame.midY - (maxLabelTextSize.height + labelPadding) let newMinLabelCenter: CGPoint = CGPoint(x: leftHandle.frame.midX, y: YPossitionMin) let newMaxLabelCenter: CGPoint = CGPoint(x: rightHandle.frame.midX, y:YPossitionMax)
New Issue Checklist
RangeSeekSlider
to the latest versionIssue Description
Hi guys! When
disableRange = true
, this library uses therightHandle
to choose a value. I found a problem withmaxLabel
boundaries when labels are not fixed. WhenrightHandle
is set to minimum value, the label exceeds slider frame and position it's not adjusted. I think this scenario it's not covered insideupdateLabelPositions
method. You can see this case in the attached screenshot. Any fix for this?Thank you!
Environment