Sha256: ab0e5c6f227fab601964f95b50b1e172d604752aa3f0a9eaa9ae6b74f0d6dec7
Contents?: true
Size: 679 Bytes
Versions: 4
Compression:
Stored size: 679 Bytes
Contents
class UnderOs::UI::Slider < UnderOs::UI::Input wraps UISlider, tag: 'slider' def initialize(options={}) super self.min = options[:min] if options[:min] self.max = options[:max] if options[:max] @_.continuous = options.delete(:track) || true # track the changes as they go @_.addTarget self, action: :handle_change, forControlEvents:UIControlEventValueChanged end def value @_.value end def value=(value) @_.value = value.to_f end def min @_.minimumValue end def min=(value) @_.minimumValue = value.to_f end def max @_.maximumValue end def max=(value) @_.maximumValue = value.to_f end end
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
under-os-ui-1.4.0 | lib/under_os/ui/slider.rb |
under-os-1.3.0 | lib/under_os/ui/slider.rb |
under-os-1.2.1 | lib/under_os/ui/slider.rb |
under-os-1.2.0 | lib/under_os/ui/slider.rb |