Chapter 3. Views, Outlets, and Actions


  • How to declare and define outlets

  • How to declare and define actions

  • How to connect outlets and actions to the views in your View window

  • How to use the UIAlertView to display an alert view to the user

  • How to use the UIActionSheet to display some options to the user

  • How to use the UIPageControl to control paging

  • How to use the UIImageView to display images

  • How to use the UIWebView to display Web content in your application

  • How to add views dynamically to your application during runtime

In the previous chapter, you built a simple Hello World! iPad application without understanding much of the underlying details of how things work together. In fact, one of the greatest hurdles in learning iPad programming is the large number of details you need to learn before you can get an application up and running. This book aims to make the iPad programming experience both fun and bearable. Hence, this chapter starts with the basics of creating the user interface (UI) of an iPad application and how your code connects with the various graphical widgets.


One of the first things you need to understand in iPad programming is outlets and actions. If you are familiar with traditional programming languages such as Java or C#, this is a concept that requires some time to get used to — the concepts are similar, just that it is a different way of doing things. At the end of this section, you will have a solid understanding ...

Get Beginning iPad™ Application Development now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.