如何使UILabel文字淡出颜色?

时间:2016-08-31 21:46:18

标签: ios swift

我知道如何淡化背景。我就是这样做的:

self.faderTimer = NSTimer.scheduledTimerWithTimeInterval(self.fadeTime, target: self, selector: #selector(self.fadeBackground), userInfo: nil, repeats: true)
func fadeBackground(){
    UIView.animateWithDuration(self.fadeTime, delay: 0, options: UIViewAnimationOptions.AllowUserInteraction, animations: { [unowned self] () -> Void in
        self.fadeView.backgroundColor = UIColor.randomFlatColor()
    }) { (Bool) -> Void in

    }
}

如何在UILabel中使用TextColor做同样的事情?

0 个答案:

没有答案