In this article I will create a single-view application. Here I use two text fields, one button and two labels from outlets. In this article I will add an activity indicator which shows after the login button is clicked.
Open XCode by double-clicking on it.
Create a New XCode Project by clicking on it.
Now select Single View Application and click on Next.
Now provide your Product Name and Company Identifier then click on Next.
Select the location where you want to save your project and click on Create.
Here we write the code:
To hide the keyboard after clicking on the keyboard return button, we link a delegate of the text field to the file owner.
To hide the Activity Indicator from the UI we select the activity indicator and mark it's property to hidden.
To secure the password field we select the text field property and set it to Secure.
At last we run our application and see the output.
Output 1 in iPhone:
Output 2 in iPhone: