Git Product home page Git Product logo

nhrangeslider's Issues

Problem accessing upperValue and lowerValue

Hi there, I am making my own custom labels displaying upperValue and lowerValue when the sliderValueChanged method is called, except I can't get the changed upperValue and lowerValues

screen shot 2017-05-07 at 5 21 03 pm

^See above for my code

Thumb buttons issue when both overlap.

  1. Move both buttons so they are over top of each other.
  2. Move one button (usually MAX) to the right, away from the other button (usually MIN)
  3. While your still dragging start dragging the opposite direction towards the other button.
  4. Notice the other button moves though your finger is not on it.
  5. Instead the range should change and the other button should stay still.

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

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

Sliding logic error with minimum gap between thumbs

Easiest to reproduce when gapBetweenThumbs = 0. Steps to reproduce:

  1. Slide thumbs as close together as possible
  2. Slide thumb left and right without releasing your finger
  3. Instead of one thumb sliding in both directions, both thumbs will each slide in their corresponding direction

How to change the upper value and lower value text Dynamically?

AS i am tried to do was

func sliderValueChanged(slider: NHRangeSlider?) {
self.custom_firstrange_slide.upperLabel?.text = "hrs and mins: (slider?.upperValue)"
self.custom_firstrange_slide.lowerLabel?.text = "hrs and mins: (slider?.lowerValue)"
}

But its not working for me i tried so much of methods to call this.
So please tell if any suggestion for this.!

Remove upper and lower labels on thumbs

Hi, been using the RangeSlider for my app, is it possible to remove the upper and lower labels on the thumbs?

What I've been using is just setting displayformat for both to be null strings, is there a better way?

upperLable position

Now the upperLabel is going beyond the view when it is a large number, for example 1000000000, so if it is possible to align the upperLabel right side with whole view?

how to increase the lowerLabel and upperLabel width ?

As i am creating the NHRangeslider inside of the tableview but hear i have an issue to increase the width of the lowerlabel and upper label text depends on the string whatever i give..?
i mean how to set the width of label dynamically, belongs to the text size.?

how i can stop slider on needed value?

Hello. At first thanks for your slider, i create custom and very happy now)
Help me please. If i have some poing on a slider and i need dont let lover and upper value going over this point to right and left respectively.
I am try do it in valueChanged, but its not so cool, because it jerks.

override func rangeSliderValueChanged(_ rangeSlider: NHRangeSlider) {

        super.rangeSliderValueChanged(rangeSlider)

        if rangeSlider.lowerValue > Double(kidLeftIndex) {
            rangeSlider.lowerValue = Double(kidLeftIndex)
            return
        }
        
        if rangeSlider.upperValue < Double(kidLeftIndex + 1) {
            rangeSlider.upperValue = Double(kidLeftIndex + 1)
            return
        }
    }

Problem adding NHRangeSliderView via Storyboard

Can you add an example in your demo app?

When I tried to add a UIView in storyboard an change it to be NHRangeSliderView class, it doesn't work. I'm only able to add it programmatically.

crashing if minimumValue is < maximumValue

can we remove the assertion of this condition?

@IBInspectable open var minimumValue: Double = 0.0 { willSet(newValue) { assert(newValue < maximumValue, "NHRangeSlider: minimumValue should be lower than maximumValue") } didSet { updateLayerFrames() } }

I use pod 'NHRangeSlider', '~> 0.2' and Swift 3 and Xcode 8.3.3

How change value on slider?

Hi,
I'm using this lib, It's helpful. but I can't change value's slider when input value from textField.
can you help me?
thanks.

How to get the different slider delegate in the same view controller?

I need to get the slider delegate value whenever i changed the slider value ,,. Its coming for single slider only in the delegate method.!
Here i used three different slider.!
i Tried to used like the below code:

if slider?.tag == 0 {
self.first_upper_lb.text = "(Int((slider?.upperValue)!))"
self.first_lower_lb.text = "(Int((slider?.lowerValue)!))"
}else if slider?.tag == 1 {
self.dep_upper_lb.text = milli_date_format.milliseconds_to_date(milliseconds: Int((slider?.upperValue)!)).timeOnly24hrs
self.dep_lower_lb.text = milli_date_format.milliseconds_to_date(milliseconds: Int((slider?.lowerValue)!)).timeOnly24hrs
}else if slider?.tag == 2 {
self.arr_upper_lb.text = milli_date_format.milliseconds_to_date(milliseconds: Int((slider?.upperValue)!)).timeOnly24hrs
self.arr_lower_lb.text = milli_date_format.milliseconds_to_date(milliseconds: Int((slider?.lowerValue)!)).timeOnly24hrs
}

But here its tag was not working.! everytime its tag value was zero only how to differentiate the different slider value.!?
Please tell is there any solution for this.!

Swift 4

Hi,

Your pod doesn't compile with Swift 4. Could you please update it ?

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.