这个问题可能要问几次 . 但我想知道确切的答案 . 问题很简单,想要 create UIColor from multiple color with Gradient 效果?但我不想遵循概念 . 相反,我研究通过简单的方式做到这一点 . 恩 . 使用多种颜色制作颜色空间并直接转换为UIColor .

更多的东西概念是:

1)Image creation with CGGradientRef and then convert into UIColor from UIImage

2)Drawing gradient color by CGContextDrawLinearGradient

3)Inserting CAGradientLayer to view's layer(see @Mirko Froehlich's answer)