Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

how to add an underline to a textField swift

var bottomLine = CALayer()
bottomLine.frame = CGRectMake(0.0, 75 - 1, 300, 1.0)
bottomLine.backgroundColor = UIColor.whiteColor().CGColor
myTextField.borderStyle = UITextBorderStyle.None
myTextField.layer.addSublayer(bottomLine)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #underline #textField #swift
ADD COMMENT
Topic
Name
3+7 =