In your xcode project first create a UItextfield type of cocoa touch class in case of underlined view create a uiview type of class as UnderlinedTextField or watever name suits you.
In UnderlinedTextField.h file of your class create a property as-
Now Drag & drop uitextfield in your view controller in the Storyboard & set its Border style to first one provided of the four Border styles i.e the dotted one & assign their custom class as UnderlinedTextField
Now you can use your textfields & underline will come with them so the user don't have to set constraints of two separate views instead we can set constraints of only our textfield & it will be displayed underlined.
0 Comment(s)