I have an app that runs perfectly on iOS 6. I've set a blinking effect to a UISlider's thumb this way:
-(void)startBlinkingSlider{
isSliderBlinking = YES;
isSliderTinted = NO;
[self performSelector:@selector(toggleSliderColor) withObject:nil afterDelay:0.2];
}
-(void)toggleSliderColor{
if(isSliderBlinking){
if(isSliderTinted){
self.effectAmountSlider.thumbTintColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:1];
}else{
self.effectAmountSlider.thumbTintColor = [UIColor colorWithRed:255 green:0 blue:0 alpha:1];
}
isSliderTinted = !isSliderTinted;
[self performSelector:@selector(toggleSliderColor) withObject:nil afterDelay:0.2];
}
}
-(void)stopBlinkingSlider{
isSliderBlinking = NO;
isSliderTinted = NO;
self.effectAmountSlider.thumbTintColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:1];
}
Run Code Online (Sandbox Code Playgroud)
当我调用startBlinkingSlider我的滑块时,在iOS 6中开始闪烁红色.如果我在iOS …