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

Tham khảo tài liệu 'phát triển ứng dụng cho iphone và ipad - part 23', 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ả | Building the Editing Controllers 189 Adding and Editing Locations with the EditLocationController The user navigates to the EditLocationController by tapping the location cell on the ViewTaskController. The EditLocationController as shown in Figure 7-9 allows the user to select a location add new locations and delete existing locations. To create the EditLocationController create a new UITableviewController without a NIB called EditLocationController. Modify your new header file to create instance variables and properties to hold the context and Task objects that the parent screen will configure. You will also need to add a member variable and property for the NSFetchedResultsController that you will use to display your location list. Additionally you will need to add import directives for the Task and Location header files. The completed header file should look like Listing 7-5. FIGURE 7-9 EditLocation Controller Screen LISTING 7-5 Available for dÏÏü lMdon import UIKit x import import interface EditLocationController UITableviewController NSFetchedResultsControllerDelegate NSFetchedResultsController fetchedResultsController NSManagedObjectContext managedObjectContext Task managedTaskObject property nonatomic retain NSFetchedResultsController fetchedResultsController property nonatomic retain NSManagedObjectContext managedObjectContext property nonatomic retain Task managedTaskObject end Let s move on to the implementation file. Add an import statement for import You will use the EditTextController to add the text for newly added locations. Next synthesize the properties that you declared in the header file synthesize fetchedResultsController managedObjectContext managedTaskObject 190 I CHAPTER 7 BUILDING A CORE DATA APPLICATION Uncomment and implement the viewDidLoad method Available for download on void viewDidLoad super viewDidLoad Set up the add button

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.