Open pt9dat opened 4 years ago
I'm also facing the same problem, all the examples have labels at top but i have at bottom and there is no way other than setting the label padding to a negative value. wish there was a more straightforward way to place label on top of slider.
+1
I was able to do it by setting the Label padding
property to a negative value. For example, I used -60
I'm also facing the same problem, all the examples have labels at top but i have at bottom and there is no way other than setting the label padding to a negative value. wish there was a more straightforward way to place label on top of slider.
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)
Issue Description
Hi, can I change the label position from bottom to top?
Environment