I had a code snippet as shown below that was used very well until I switched to Swift 3 to draw a border around the UIView. I just want this to be possible at the bottom of the UIView.
let border = CALayer()
border.frame = CGRect(x: 0, y: self.basicDetailsView.frame.height - 2, width: self.basicDetailsView.frame.width, height: 2)
border.backgroundColor = UIColor.gray().cgColor
self.basicDetailsView.layer.addSublayer(border)
source
share