Skip to Content
Beginning iOS 5 Application Development
book

Beginning iOS 5 Application Development

by Wei-Meng Lee
January 2012
Beginner content levelBeginner
655 pages
16h 35m
English
Wrox
Content preview from Beginning iOS 5 Application Development

SUMMARY

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

  1. Declare and define an outlet for a UITextField view using code.
  2. Declare and define an action using code.
  3. When do you use an alert view and when do you use an action sheet?
  4. Create a UIButton from code and wire its Touch Up Inside event to an event handler.

    Answers to the exercises can be found in Appendix D.

image 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering iOS 12 Programming - Third Edition

Mastering iOS 12 Programming - Third Edition

Donny Wals
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9781118144251Purchase book