Đang chuẩn bị liên kết để tải về tài liệu:
iOS 5 Programming Cookbook phần 4
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
xảy ra khi người dùng quyết định để lật đến trang tiếp theo. Phương pháp thứ hai được gọi là bộ điều khiển xem trang muốn xem bộ điều khiển để hiển thị sau khi bộ điều khiển xem được lộn. Xcode, như bạn đã nhìn thấy nó, đơn giản hóa rất nhiều thiết lập một ứng dụng dựa trên trang. | happens when the user decides to flip to the next page. The second method is called when the page view controller wants to figure out which view controller to display after the view controller which is being flipped. Xcode as you ve already seen it has greatly simplified setting up a page-based application. All you really need to do now is to provide content to the data model Model Controller and on you go. If you need to customize the colors and images in your view controllers simply do so by either using the Interface Builder to modify the .xib files directly or write your own code in the implementation of each of the view controllers. See Also XXX 2.22 Displaying Popovers with UlPopoverController Problem You want to display content on an iPad without blocking the whole screen. Solution Use popovers. Discussion Popovers are used to display additional information on the iPad screen. An example is the Safari app on the iPad. When the user taps on the Bookmarks button she will see a popover displaying the bookmarks content on the screen see Figure 2-71 . 2.22 Displaying Popovers with UIPopoverController 251 Figure 2-71. The bookmarks popover in the Safari app on an iPad The default behaviour of popovers is that when the user taps somewhere outside the region of the popover the popover will automatically get dismissed. We can ask the popover to not get dismissed if the user taps on specific parts of the screen as we will see later. Popovers present their content by using a view controller. Note that you can also navigation controllers inside popovers as navigation controllers subclass UlView Controller. Popovers can only be used on iPad devices. If you have a view controller whose code runs both on an iPad and on an iPhone you need to make sure that you are not instantiating the popover on a device other than the iPad. Popovers can be presented to the user in two ways 1. From inside a navigation button an instance of UIBarButtonltem. 2. From inside a rectangular area