2014-11-14 5 views
0

CGRectMake의 x 값을 UISlider.value로 설정하여 UIImageView를 좌우로 이동시키는 UISlider가 있습니다. 슬라이더가 멈 추면 다른 동작이 발생할 수 있음을 감지하고 싶습니다. 어떻게하면 UISlider가 멈출 때를 감지하고 다른 것을하기 위해 if 문을 쓸 것인가. http://stackoverflow.com/questions/ :UISlider가 X 코드를 완료하면 감지

+1

가능한 중복을 추가 것을 발견 954498/in-uikid-how-to-detect-when-a-uislider-has-stopped-moving-but-has-been- –

답변

0

는 내가 뭘하는 데 필요한 모든 내 슬라이더의 IBAction를 내부

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

을 추가 한 다음

-(void) stopSlider;{ 

    with whatever code I wanted to happen when I stop touching the slider here 
} 
관련 문제