Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add extra text to min value and max value? like 1Feet and 10Feet #88

Open
2 tasks
sasikumarperumal opened this issue Dec 30, 2019 · 1 comment
Open
2 tasks

Comments

@sasikumarperumal
Copy link

New Issue Checklist

  • Updated RangeSeekSlider to the latest version
  • Checked Gitter

Issue Description

Environment

@khurramlodhi
Copy link

You have to change in pod file.
On the place of "$" you can put string you want..

private func updateLabelValues() {
minLabel.isHidden = hideLabels || disableRange
maxLabel.isHidden = hideLabels

    if let replacedString = delegate?.rangeSeekSlider(self, stringForMinValue: selectedMinValue) {
        minLabel.string = replacedString
    } else {
        minLabel.string = "$ " + numberFormatter.string(from: selectedMinValue as NSNumber)!
    }

    if let replacedString = delegate?.rangeSeekSlider(self, stringForMaxValue: selectedMaxValue) {
        maxLabel.string = replacedString
    } else {
        maxLabel.string = "$ " + numberFormatter.string(from: selectedMaxValue as NSNumber)!
    }

    if let nsstring = minLabel.string as? NSString {
        minLabelTextSize = nsstring.size(withAttributes: [.font: minLabelFont])
    }

    if let nsstring = maxLabel.string as? NSString {
        maxLabelTextSize = nsstring.size(withAttributes: [.font: maxLabelFont])
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants