Check out example codes for "how to add an underline to a textField swift". It will help you in understanding the concepts better.

Code Example 1

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)

Learn ReactJs, React Native from akashmittal.com