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

Tham khảo tài liệu 'phát triển ứng dụng cho iphone và ipad - part 35', 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ả | Example 1 Location-Based Search 309 You will be using these frameworks in your LocationSearchViewController class. Therefore you will need to import the headers for these frameworks in the header. Add the following import statements to the header file Available lor download on import MapKit import CoreLocation The user interface for the application consists of a search bar to accept the search criteria from the user and a map view that you will use to display the search results. Because you need access to both of these interface items in your code you will need to add instance variables and outlets for these elements. In the header add instance variables for an MKMapView called mapView and a UISearchBar called searchBar to the interface definition Available for download on MKMapView mapView UISearchBar searchBar Now that you have declared your instance variables declare IBOutlet properties for these UI elements so that you have access to them in Interface Builder Available lor download on property property nonatomic retain IBOutlet MKMapView mapView nonatomic retain IBOutlet UISearchBar searchBar Next you will move into the implementation file . You first need to synthesize your two new properties. Add a line to synthesize the mapView and searchBar properties to the implementation synthesize mapView searchBar Finally any time that you use a property that retains its value you need to clean up the memory used by the property in the dealloc and viewDidUnload methods. Add the code to set the outlet properties to nil in the viewDidUnload method Available for download on - void viewDidUnload Release any retained subviews of the main view. . nil nil nil .

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.