Chapter 4. Exploring the Views
WHAT YOU WILL LEARN IN THIS CHAPTER
How to use the
UIAlertView
to display an alert view to the userHow to use the
UIActionSheet
to display some options to the userHow to use the
UIPageControl
to control pagingHow to use the
UIImageView
to display imagesHow to use the
UISegmentedControl
to display a set of buttons for the user to choose amongHow to use the
UIWebView
to display Web content in your applicationHow to add views dynamically to your application during runtime
How to wire a view to a View Controller
How to switch between views
Up to this point, you should already have some ideas of how to use Xcode and Interface Builder to build iPhone applications. In this chapter, you dive into the various views that you can use to spice up your applications. You learn how you can add views using Interface Builder, as well as how to create views dynamically during runtime.
USING THE VIEWS
So far, you have seen quite a number of views in action in the previous few chapters — Round Rect Button, TextField, and Label. All these views are quite straightforward, but they give you a good opportunity to understand how to apply the concepts behind outlets and actions.
To use more views, you can locate them from the Library window in Interface Builder (see Figure 4-1).
Figure 4.1. Figure 4-1
As you can see, the Library is divided into sections:
Controllers — contains views that ...
Get Beginning iPhone® SDK Programming with Objective-C® now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.