Sunday, April 24, 2011

IPhone App Dev

Woot! Finished Chapter 3:Handling Basic Interaction. Learnt how to add outlets and actions to an app. Command+Shift+3 == Take Screenshot and save it to file on desktop. Finished Chapter 4: More User Interface Fun. Brief recap:
Outlets - represent UI elements whose behaviour or attributes you want to query or change at runtime.
Actions - methods which are run when a UI event occurs.
1. Define outlets and actions in the header file (.h file).
2. Code actions in the implementation file (.m file).
3. Connect outlets to UI elements (eg labels) by dragging from the 'File's Owner' icon to the UI element, then selecting the relevant outlet (defined in Step 1) to be assigned.
4. Connect event of UI element to action by dragging from UI element's action in the Connection inspector to the 'File's Owner' icon, then selecting the relevant action.

No comments: