I want to add an inner border bottom to one of the subclass(custom) of UIView , I am looking if there is an extension for the UIview . Thanks in advance.
extension UIView {
func customBorder(){
let borderWidth: CGFloat = 0.84
self.frame = frame.insetBy(dx: -borderWidth, dy: -borderWidth)
self.layer.borderColor = UIColor.white.cgColor
self.layer.borderWidth = borderWidth
self.clipsToBounds = true
}
}