Get Slightly Lighter and Darker Color from UIColor

前端 未结 19 2707
猫巷女王i
猫巷女王i 2020-12-07 07:08

I was looking to be able to turn any UIColor into a gradient. The way I am intending to do this is by using Core Graphics to draw a gradient. What I am trying to do is to ge

19条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 07:31

    for darker color, this is the simplest: theColor = [theColor shadowWithLevel:s]; //s:0.0 to 1.0

提交回复
热议问题