CALayer: add a border only at one side

前端 未结 7 2037
北荒
北荒 2020-11-28 02:56

I can add a border to a CALayer in this way:

[webView.layer setBorderColor: [[UIColor colorWithRed:0.6 green:0.7 blue:0.2 alpha:1] CGColor]];
[webView.layer          


        
相关标签:
7条回答
  • 2020-11-28 03:32

    The border property always add border to 4 sides of your view. You can make your own draw method to draw the border at the bottom of your view.

    But, why don't you just add a view above your UIWebView to make it looks like a border?

    0 讨论(0)
提交回复
热议问题