пятница, 1 февраля 2013 г.

для чего нужен view controller x-code

When developing a navigation-based application the central component of the architecture is the navigation controller. In addition, each screen has a table view and a corresponding view controller. The navigation controller maintains a stack of these view controllers. When a new view is displayed it is pushed onto the navigation controllerРІР‚в„ўs stack and becomes the currently active controller. When the user selects the button in the navigation bar to move back to the previous level, that view controller is popped off the stack and the view controller beneath it moved to the top becoming the currently active controller.

Navigation based applications present a hierarchical approach to displaying information to the user. Such applications typically take the form of a navigation bar (UINavigationBar) and a series of Table based views (UITableView). Selecting an item from the table list causes the view associated with that selection to be displayed. The navigation bar will display a title corresponding to the currently displayed view together with a button that returns the user to the previous view when selected. For an example of this concept in action, spend some time using the iPhone Mail or Settings applications.

The above caveats aside the goal of this chapter is to provide an overview of how to use the table view to implement navigation within an iPad application. The reason for including this in an iPad development book is two-fold. Primarily this is provided because a good understanding of the table view is needed to be able to implement split view and popover based interfaces on the iPad (a topic covered in some detail in the chapter entitled ). The second reason for including this information is the fact that there may well be instances where pure table view navigation on the iPad might actually be the right solution for your application.

In the previous chapter (entitled ) we looked at the basics of the Table View object and worked through the creation of a simple example iPad application containing a single table view without any application navigation capabilities. Also discussed in the previous chapter was the fact that table view based navigation is primarily intended for use in iPhone applications and that it is more likely that a table view will be used within the context of a Split View and Popover based interface within iPad applications.

Purchase the fully updated iOS 6 Edition of this book in Print ($29.99) or eBook ($12.99) formatPrint and eBook (ePub/PDF/Kindle) editions contain 81 chapters.

Creating a Simple iOS 4 iPad Table View Application (Xcode 4)An iPad iOS 4 Split View and Popover Example (Xcode 4)

Creating a Navigation based iOS 4 iPad Application using TableViews (Xcode 4)

Creating a Navigation based iOS 4 iPad Application using TableViews (Xcode 4) - Techotopia

Комментариев нет:

Отправить комментарий