14
Presenting View Controllers

iOS applications often present users with a view controller showing an action they must complete or dismiss. For example, when adding a new contact on iPhone, users are presented with a screen to fill out the contact’s details (Figure 14.1). We call this kind of presentation modal, as the application is being put into a different mode where a set of actions become the focus.

Figure 14.1  Creating a new contact

Creating a new contact

Modally presented view controllers often occupy the entire screen, but they do not have to. Sometimes – especially on iPad, where there is more space to work with – they take up only a portion of the screen (Figure 14.2). Either way, though, the user must interact with the modally presented view controller before proceeding.

Figure 14.2  Creating a new contact on iPad

Creating a new contact on iPad

Over the course of the next two chapters, you will extend the LootLogger application to add the ability for users to associate a photo with each of their items. In this chapter, you will present the user with the option to select a photo from either the camera or the device’s photo library (Figure 14.3). In Chapter 15, you will respond to the user’s selection by presenting either the camera interface or the photo library interface.

Figure 14.3  Choosing a photo source in LootLogger

Choosing a photo source in LootLogger
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.93.210