قالب وردپرس درنا توس
Home / IOS Development / Resize UITextField lower border / underline: iOSProgramming

Resize UITextField lower border / underline: iOSProgramming



Original
Resized
I am trying to expand the lower border / underline with the text (for example, to the end of the ellipse), but am not sure how to do it. I guess it's because I have the code for the border in viewDidLoad (and thus it doesn't change with text), but not sure where else to put it?
Current code: [19659002] let bottomLine = CALayer ()
bottomLine.frame = CGRect (x: 0, y: desiredInput.frame.size. height-10, width: desiredInput.frame.width, height: 1)
bottomLine.backgroundColor = UIColor.white.cgColor
desiredInput.borderStyle =. no
desiredInput.layer.addSublayer (Bottom)

All help will be greatly appreciated!


Source link