Questions tagged [uislider]

A UISlider object is a visual control used to select a single value from a continuous range of values. Sliders are always displayed as horizontal bars. An indicator, or thumb, notes the current value of the slider and can be moved by the user to change the setting. Available in iOS 2.0 and later in UIKit.

UISlider commonly refers to the UISlider control used in iOS programming.

1610 questions
18
votes
6 answers

Custom UISlider - Increase "hot spot" size

I have a custom UISlider that is relatively tough for big fingered people to grab hold of and slide due to the size of the "thumb image". Is there any way to increase the size of clickable / draggable area without altering the size of the…
unsunghero
  • 971
  • 1
  • 10
  • 22
17
votes
7 answers

UISlider and UIScrollView

I have a UISlider as part of a view that is loaded into a UIScrollView with paging enabled. I've noticed an unexpected behavior. If the user tries to use the slider quickly (i.e. press and move) it "activates" the scroll view, causing the page to…
MarkPowell
  • 16,482
  • 7
  • 61
  • 77
17
votes
9 answers

How to customise UISlider height

I have project in which have to customise UISlider element. I wondering if someone knows how to change, or is it possible to change height of UISlide bar line. I tried something like this but don't work: let customBounds = CGRect(origin:…
Nik
  • 1,517
  • 5
  • 14
  • 19
17
votes
3 answers

Jquery UI Slider change value of slider when changed in input field

$("#storlekslider").slider({ range: "max", min: 0, max: 1500, value: 0, slide: function(event, ui) { $("#storlek_testet").val(ui.value); $(ui.value).val($('#storlek_testet').val()); } }); // $( "#storlek_testet"…
oBo
  • 992
  • 2
  • 13
  • 28
16
votes
1 answer

Having the UIControlEventValueChanged fire when UISlider is being animated?

I have set my UISlider up to respond to value changed events: [customSlider addTarget:self action:@selector(sliderMove:) forControlEvents:UIControlEventValueChanged]; [customSlider addTarget:self action:@selector(sliderStart:)…
RickiG
  • 11,380
  • 13
  • 81
  • 120
16
votes
3 answers

NoUIslider - Update range on demand

I have two sliders and I would like to update the range of one slider based on the movement of the other. For instance; slider_1 and slider_2 both have a range of 1-10. When I move slider_1 from position 1 to 2, slider_2's range changes from 1-10 to…
DGDD
  • 1,370
  • 7
  • 19
  • 36
16
votes
3 answers

UISlider highlight state with different thumb width than normal

I'm trying to implement a custom UISlider (subclass of UISlider), that behaves in a similar way to the native slider that has a glow around the thumb when it's highlighted. I'm having trouble with this, though. The (effective) width of the…
Farski
  • 1,670
  • 3
  • 15
  • 30
15
votes
8 answers

Is that possible to add a label to the UISlider's thumb image?

I want to add a label to the slider's thumb which should show the value of the slider and changes too when thumbs is being dragged towards right side. Is it possible?? Any comments or suggestion would be appreciated.
Ashutosh
  • 5,614
  • 13
  • 52
  • 84
15
votes
2 answers

how to get the position of an object within a UIView, within a UIScrollView

so lets say I have a UIScrollView, within it are 3 UIViews, within those there is a UISlider in each one. they are positioned vertically in the UIScrollView. I now have a 4th UIView also in the UIScrollView which I wish to move around depending on…
zambono
  • 1,397
  • 1
  • 17
  • 26
15
votes
7 answers

How can I restrict iOS slider value to an integer?

I have a horizontal UISlider to control the volume from 1 to 16 as min and max value, but it's returning float values when I do print(). How can I restrict the UISlider value to an integer? @IBOutlet var ringValue: UISlider! @IBAction func…
Keyur Padalia
  • 2,077
  • 3
  • 28
  • 55
15
votes
4 answers

Is there a way to make the jQuery UI slider start with 0 on top instead of on bottom?

Look at this demo of the jQuery UI Slider. Notice how when the handle is down the bottom, the value is 0? Is there a way to reverse this, so the handle up the very top is 0, and the handle down the bottom is the max range? I've played a bit with…
alex
  • 479,566
  • 201
  • 878
  • 984
15
votes
2 answers

Xcode 6- SWIFT- Cast CMTime as Float

var songs = MPMediaQuery() var localSongs = songs.items songList = NSMutableArray(array: localSongs) tableView.reloadData() var song = MPMediaItem(coder: songList[0] as NSCoder) var currentItem = AVPlayerItem(URL:…
Abdou23
  • 363
  • 1
  • 4
  • 11
15
votes
3 answers

Detecting touches on a UISlider?

I have a UISlider on screen, and I need to be able to detect when the user stops touching it. (so I can fade some elements away). I have tried using: - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event but this did not work when ending…
Andrew Martin
  • 161
  • 1
  • 1
  • 3
14
votes
5 answers

UISlider setMaximumTrackTintColor in iOS 7.1

[slider setMaximumTrackTintColor: color] has unexpected results in iOS 7.1 (the slider bar changes its position appearing at top instead of vertical center or disappears completely), while working fine with prior versions. [slider…
user623396
  • 1,537
  • 1
  • 17
  • 39
14
votes
6 answers

UISlider setMaximumTrackTintColor

I'm trying to dynamically configure the track color on a UISlider. This line of code works perfectly for setting the low side of the slider track. [self.sliderBar setMinimumTrackTintColor:[UIColor redColor]]; When trying to do the same thing for…
Reid
  • 143
  • 1
  • 1
  • 5