I am using storyboard for UI builder, and I added this in viewDidLoad. But the bottom border doesn't go all the way the "EnteredEmail.frame.width" equals the size of the textfield in the storyboard which is iPhone SE
override func viewDidLoad() {
super.viewDidLoad()
let EmailBottomLine = CALayer()
EmailBottomLine.frame = CGRect(x: 0.0, y: EnteredEmail.frame.height-5, width: EnteredEmail.frame.width, height: 5)
EmailBottomLine.backgroundColor = UIColor.black.cgColor
EnteredEmail.layer.addSublayer(EmailBottomLine)
}