This tutorial will guide you to create a simple app with a Login screen which takes username and password from the user and then POST it to an url and parse the JSON response.
- Create a New project.
- Create the Screen(View).
- Declare and Connect the properties and functions to the UI elements.
- Set actions for Background Click and text field Return events.
- Post data to URL and parse the JSON response.
1. Create a New project.
1. Launch XCode .
2. Click: File->New Project…
and choose: Single View Application
3. Name the project: ‘LoginJson’ and you can give a file prefix also, here i have given “DK”.
When you choose Single View Application, XCode creates many files for you, among which the following files are of our interest:
the DKViewControl.xib is the design of the view
the other files are used for the class files for the view
and also XCode creates the view and puts it as the main screen when the program launches.