iPhone: Activate UISlider and set its value to the location of the current touch programatically
Posted
by carloe
on Stack Overflow
See other posts from Stack Overflow
or by carloe
Published on 2010-03-18T00:55:14Z
Indexed on
2010/03/18
1:01 UTC
Read the original article
Hit count: 435
Is it possible to set an UISlider
as first responder and set its current value to the location of the current touch programatically?
The way my app is set up I have a UIView
container that takes up the whole screen. Inside the container I have another UIView
offscreen at the bottom edge (I'll call this bottomBar). Inside the bottomBar there is a UISlider
element.
Right now, when the user swipes along the bottom edge of the screen the bottomBar the slider it contains slide up. What I am trying to achieve is to activate the UISlider
, and set the position of the slider (the value) to the position of the users touch. Is this possible? Could someone please point me in the right direction?
© Stack Overflow or respective owner