UITextField and its Properties in IOS ?

UITextField and its Properties

By using this view we can place single line text content.

When we are working UITextfield we require to implement UITextfieldDelegate methods.

When we are editing UITextfield data then automatically keyboard will appear.

UITextField propertie’s are.

1)borderStyle
2)autocorrectionType
3)keyboardType
4)keyboardAppearance
5)returnKeyType
6)delegate
7)enable
8)secure/securityTextEntry

textFieldShouldReturn method will call when we click on return button of keyboard.

textFieldShouldBegingEditing will call when editing is started.

textFieldShouldEndEditing is called when editing is finished.

To hide the keyboard on any textField then we need to call resignFirstResponder method.

When we require to focus on any one of the text field then recommended to go for becomeFirstResponder method.

when we require to create non editable textField we doesn’t having any properties so, we required to hide the keyboard when user touches the specific textField.(in this case we can disable userInteraction aslo).


Discover more from mycodetips

Subscribe to get the latest posts sent to your email.

Discover more from mycodetips

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top