iPhone SDK 3 Programming Advanced Mobile Development for Apple iPhone and iPod touc phần 4

Sau đó, chúng tôi thảo luận một số kỹ thuật hoạt hình trong Phần . Tiếp theo, mục đề với làm thế nào để sử dụng chức năng Quartz 2D để vẽ bên trong xem. Cuối cùng, chúng tôi tóm tắt chương tại Mục . | View Controllers 183 Figure Showing the additional items on the tab bar by tapping on the More item. Figure Showing an item on the More list. Tapping on More shows the More list. Tapping on the More item will present a list of the rest of the view controllers. Figure shows how the view changes when the More item is tapped. The user can then tap on any of the items to activate the corresponding view controller. Figure shows what happens when the user taps on the R T item. The user can tap on the More button to go back to the list of More items. The More item is managed by a navigation controller which can be accessed using the tab bar controller s property moreNavigationController which is declared as @property nonatomic readonly UINavigationController moreNavigationController We will talk more about navigational controllers in the next section. For now note that a navigational controller allows the application developer to present the user with hierarchical information in a natural way. Badge. Every item on the tab bar can have an optional value displayed in its upper-right corner surrounded by a red oval. The property that controls this is badgeValue which is declared as @property nonatomic copy NSString badgeValue 184 iPhone SDK 3 Programming Ji. AT T 5 9 38 PM Rectangle Ellipse Figure Showing a badge value for a view controller on a tab bar. The default value for this property is nil. You can assign any string value to it but usually it is a short message . a number . For example to add a badge value to the third controller we can write @ 3 Figure shows the effect of this line on the appearance of the tab bar. Selected Controller. You can retrieve or change the selected controller by manipulating the selectedviewController property. The property is declared as property nonatomic assign UlViewController selectedViewController Note that if the More item is selected the view controller for the More .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.