TAILIEUCHUNG - Lập trình iPhone part 7

Trong chương trước, bạn đã xây dựng ứng dụng MultiView đầu tiên của bạn. Trong chương này, bạn sẽ xây dựng một ứng dụng tab bar đầy đủ với năm tab khác nhau và năm tab khác nhau và năm quan điểm nội dung khác nhau. Xây dựng ứng dụng này sẽ củng cố rất nhiều những gì bạn đã học trong trướci, nhưng bạn quá thông minh để dành toàn bộ chương đang làm công cụ bạn đã sorta biết làm thế nào để làm, vì vậy chúng ta sẽ sử dụng những năm lượt xem nội dung để. | Ch Tab Bars and Pickers 1. . . h n the last chapter you built your first multiview application. In this chapter you re going to build a full tab bar application with five different tabs and five different content views. Building this application is going to reinforce a lot of what you learned in the last chapter but you re too smart to spend a whole chapter doing stuff you already sorta know how to do so we re going to use those five content views to show you how to use a type of iPhone control that we have not covered yet. The control is called the picker view although it s usually just called the picker. Figure 7-1. A picker in the Clock application You may not be familiar with the name but you ve almost certainly used a picker if you ve owned an iPhone for more than say 10 minutes. Pickers are the controls with dials that spin. You use them to input dates in the Calendar application or to set a timer in the Clock application see Figure 7-1 . Pickers are rather more complex than the iPhone controls you ve seen so far and as such they deserve a little more attention. Pickers can be configured to display one dial or many. By default pickers display lists of text but they can also be made to display images. 139 140 CHAPTER 7 Tab Bars and Pickers The Pickers Application This chapter s application Pickers will feature a tab bar. As you build Pickers you ll change the default tab bar so it has five tabs add an icon to each of the tab bar items and then create a series of content views and connect each to a tab. The first content view we ll build will have a date picker which is the easiest type of picker to implement see Figure 7-2 . The view will also have a button that when tapped will display an alert that displays the date that was picked. The second tab will feature a picker with a single list of values see Figure 7-3 . This picker is a little bit more work to implement than a date picker. You ll learn how to specify the values to be displayed in the picker by .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.