Search code examples
iphoneimplementationuislider

IPhone UISliders affect each others


For example, there are two sliders on the screen, an upper one and the other lower one. I want to implement the following effect.

User slide the upper slider to value 50, then the lower slider will slide to value 50 itself simultaneously(with no user sliding).

I'm wondering how can I implement it? Could anybody show me some source code or something?


Solution

  • on action event of slider1 just add this code..

    [slider2 setValue:slider1.value];