我可以用这种方式为CALayer添加边框:
[webView.layer setBorderColor: [[UIColor colorWithRed:0.6 green:0.7 blue:0.2 alpha:1] CGColor]];
[webView.layer setBorderWidth: 2.75];
Run Code Online (Sandbox Code Playgroud)
但是,是否可以仅在一侧添加边框?我只需要底部的边框.或者我可以用其他属性来达到这个目的,例如框架,边界,面具,......?

谢谢你的帮助!
b控制-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];
Run Code Online (Sandbox Code Playgroud)
请查看CALayer文档:https: //developer.apple.com/documentation/quartzcore/calayer
看看这里:http: //iosdevelopertips.com/cocoa/add-rounded-corners-and-border-to-uiwebview.html