TAILIEUCHUNG - Lập trình iPhone part 8

Trong chương tiếp theo của chúng ta, chúng tai sẽ xây dựng một ứng dụng chuyển hướng dựa trên thứ bậc tương tự như ứng dụng Mail chuyển trên iphone. Ứng dụng của chúng ta sẽ cho phép người sử dụng đi sâu vào danh sách lồng nhau của dữ liệu và chỉnh sửa dữ liệu đó. | Chapter Introduction to Table Views . n our next chapter we re going to build a hierarchical navigation-based application similar to the Mail application that ships on the iPhone. Our application will allow the user to drill down into nested lists of data and edit that data. But 8 before we can do that you need to master the concept of table views. And that s the goal of this chapter. Table views are the most common mechanism used to display lists of data to the are highly configurable objects that can be made to look practically any way you want them to. Mail uses table views to show lists of accounts folders and messages but table views are not just limited to the display of textual data. Table views are also used in the YouTube Settings and iPod applications even though these applications all have very different appearances see Figure 8-1 . Figure 8-1. Though they all look different the Settings iPod and YouTube applications all use table views to display their data. 185 186 CHAPTER 8 Introduction to Table Views Table View Basics Tables display lists of data. Each item in a table s list is a row. iPhone tables can have an unlimited number of rows constrained only by the amount of available memory. iPhone tables can be only one column wide. A table view is the view object that displays a table s data and is an instance of the class UITableView. Each visible row of the table is implemented by the class UITableViewCell. So a table view is the object that displays the visible part of a table and a table view cell is responsible for displaying a single row of the table see Figure 8-2 . Figure 8-2. Each table view is an instance of UITableView and each visible row is an instance of UITableViewCell. Table views are not responsible for storing your table s data. They only store enough data to draw the rows that are currently visible. Table views get their configuration data from an object that conforms to the UITableViewDelegate protocol and their row data .

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.