Sunday, 18 October 2015

UiTextField and its properties

In this post , I am going to explain about how to implement UITextField and its properties.

Firstly , Create a new project and add UITextField to MainStoryBoard by dragging UITextField from the utility area. ( If you dont know about how to add UITextField to a storyboard , Please view my previous posts)

After Adding UITextField to MainStoryBoard , Run your application  by  cmd + r or windows + r or Click on Run button on the ToolBar of Xcode. 

Now by clicking on UITeXtField on the simulator ios default keyboard will appear. We can input any text on our TextField through that keyboard. (Like i wrote hello)


This is simple implementation of UITextField in our application. 

Properties of UITextField :

1) Placeholder text which is shown when there is no user input.
2) Normal Text
3) Auto correction type
4) Keyboard type
5) Alignment
6) Delegate
7) Text Color
8) Font
9) Tag

You can play around with all these properties by clicking on the UITextField in the main StoryBoard. Then by clicking on Show the attributes Inspector in the utility area. 

This is all about UITextField and its properties . I will tell you about UITextField Delegates in my future posts .

Thank you :)