detecting when a UISlider finishes Xcode

42 Views Asked by At

I have a UISlider that makes a UIImageView move from side to side by setting the x value in CGRectMake the UISlider.value. I want to detect when the slider stops so I can have another action happen. How would I go about detecting when the UISlider stops and then write an if statement to do something else.

1

There are 1 best solutions below

0
On

I found out that all I needed to do was add

[zoomSlider addTarget:self action:@selector(stopSlider)
         forControlEvents:UIControlEventTouchUpInside];

inside the IBACTION for my slider and then add

-(void) stopSlider;{

  with whatever code I wanted to happen when I stop touching the slider here
}