January 2012
Beginner
655 pages
16h 35m
English
This chapter explored the roles played by outlets and actions in an iPhone application. Outlets and actions are the cornerstone of iOS development, so understanding theiruse is extremely important. Throughout this book, you will come across them frequently. You have also seen the use of some of the commonly used views in the Library.
In the next chapter, you learn about the various types of View controllers supported by the iOS SDK, and how you can use them to build different types of iPhone and iPad applications.
EXERCISES
Answers to the exercises can be found in Appendix D.
WHAT YOU LEARNED IN THIS CHAPTER
| TOPIC | KEY CONCEPTS |
| Action | An action is a method that can handle events raised by views (for example, when a button is clicked, etc.) in the View window. |
| Outlet | An outlet allows your code to programmatically reference a view on the View window. |
| Adding outlet using code | Use the IBOutlet keyword: IBOutlet UITextField *txtName; |
| Adding action using code | Use the IBAction keyword: (IBAction) btnClicked:(id) sender; |
| Connecting actions | To link actions, you commonly drag from the view in the View window onto ... |