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).

tips & tricks

Join 7,719 other subscribers

interview questions


Algorithm Android Android Studio API APP Programming Apps blogging Browser CheatSheets Code Config CSS DATABASE dsa error Features HTML HTML5 IDE installation Interview Questions IOS iPhone javascript Mac objective-c OneDrive OS Placeholder Programming quicktips SDK SEO Settings SMO SQL swift swiftUI Teams Tips & Tricks Tools UI Web Wordpress Xcode


Archives

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from CODE t!ps

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

Continue reading