TAILIEUCHUNG - Phát triển ứng dụng cho iPhone và iPad - part 12

Tham khảo tài liệu 'phát triển ứng dụng cho iphone và ipad - part 12', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Implementing Search 79 FIGURE 3-7 Catalog with search interface FIGURE 3-8 Search in progress The UISearchDisplayController is initialized with a search bar and the View Controller containing the content to be searched. When a search begins the search display controller overlays the search interface above the original View Controller s view to display a subset of the original data. The results display is a table view that is created by the search display controller. The first step is to create the UISearchBar and add it to the table. In the RootViewController header add an instance variable and associated property for the search bar 0 interface RootViewController UITableViewController NSMutableArray products down oadon UISearchBar searchBar property retain nonatomic NSMutableArray products property retain nonatomic UISearchBar searchBar In the RootViewController implementation file synthesize the searchBar synthesize searchBar You can now add the code to create the SearchBar and add it to the header of the TableView at the end of the viewDidLoad method Oil Create search bar UISearchBar alloc initWithFrame pliable lor CGRectMake autorelease 80 I CHAPTER 3 DISPLAYING YOUR DATA THE UITABLEVIEW Next you will create and configure the UISearchDisplayController. This controller will be used to filter and display the data in the RootViewController s TableView. In the header for RootViewController add an instance variable and associated property for the SearchDisplayController 0 interface RootViewController UITableViewController NSMutableArray products Available tar download on UISearchBar searchBar UISearchDisplayController searchcontroller property retain nonatomic NSMutableArray products property retain nonatomic UISearchBar searchBar property retain nonatomic UISearchDisplayController searchcontroller .

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.