相关疑难解决方法(0)

UISlider thumbTintColor doesn't change on iOS 7 (fine on iOS 6)

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 …

objective-c uislider ios ios6 ios7

14
推荐指数
3
解决办法
1万
查看次数

标签 统计

ios ×1

ios6 ×1

ios7 ×1

objective-c ×1

uislider ×1