How to set a gradient border on UIView?

后端 未结 2 995
执笔经年
执笔经年 2020-12-29 15:33

It\'s very easy to put a simple border on a UIView. You simply link to QuartzCore, import it, and use:

self.view.layer.borderColor          


        
2条回答
  •  忘掉有多难
    2020-12-29 16:08

    I created a second gradient layer with the colors reversed in the array, and then made the frame of the second layer slightly smaller than the first layer. Creates the appearance of a border.

提交回复
热议问题