- 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.
4. Set Actions for Background Click and text field Return events.
We need to batch the events such as the background clicks(user taps in the empty area of the view) and when the return key in pressed in the textfields.
What i am doing here is:
- Create the action backgroundClick().
- Change the class of the view from UIView to UIControl
- Attach the action to the Touchup Inside event of the UIControl.
- Attach the action to the Did End On Exit event of both the text field.