ortuman / SwiftForms

A small and lightweight library written in Swift that allows you to easily create forms.
MIT License
1.33k stars 209 forks source link

Slider is disabled #152

Closed alexbartisro closed 7 years ago

alexbartisro commented 7 years ago

I have a slider in my form, but for the love of God, I can't get it to slide

row = FormRowDescriptor(tag: Static.slider, type: .slider, title: "Weather scroll speed")
        row.configuration.stepper.maximumValue = 250.0
        row.configuration.stepper.minimumValue = 1.0
        row.configuration.stepper.steps = 1.0

        row.configuration.cell.didUpdateClosure = { (value: FormRowDescriptor) in
            guard let option = value.value as? Double else { return  }
            self.updateWeatherLabelSlidingSpeed(Float(option))
        }
        row.configuration.cell.appearance = ["titleLabel.textColor": UIColor.blueGray,
                                             "sliderView.tintColor": UIColor.blueGray]
        settingsSection.rows.append(row)

Even if I use the slider from the sample project it's the same. The slider is there, but it doesn't slide.

Edit apparently there is a weird issue, mostly visible on the simulator, but on the device also, where the touch area for the slider knob is smaller then the slider.

alexbartisro commented 7 years ago

Issue was from a pan gesture recognizer I had setup on a table, not with this framework. Thanks!