CALayer: добавить границу только с одной стороны

Я могу добавить границу к CALayer следующим образом:

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

Но возможно ли добавить границу только с одной стороны? Мне нужна только рамка внизу. Или я могу достичь этого с помощью других свойств, например кадр, границы, маска, ...?

enter image description here

Спасибо за помощь!


@ Control-V

        UIWebView *webView = [[UIWebView alloc] init];
        CALayer *webViewLayer = webView.layer;

        // now you can do a lot of stuff like borders:
        [webViewLayer setBorderColor: [[UIColor greenColor] CGColor]];
        [webViewLayer setBorderWidth: 2.75];    

Посмотрите документацию CALayer: https://developer.apple.com/documentation/quartzcore/calayer

И посмотрите здесь: http://iosdevelopertips.com/cocoa/add-ounded-corners-and-border-to-uiwebview.html

62
задан Cœur 1 July 2017 в 03:56
поделиться