Đang chuẩn bị liên kết để tải về tài liệu:
beginning iphone 3 development exploring the iphone sdk phần 8

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

cũng giống như bạn sẽ truy cập dữ liệu có khóa từ một NSDictionary. Sự khác biệt là NSUserDefaults dữ liệu tồn tại hệ thống tập tin thay vì được lưu trữ trong một thể hiện đối tượng trong bộ nhớ. trong | 380 CHAPTER 11 Basic Data Persistence Check that checkbox and then click the Choose. button. When prompted enter a project name of Core Data Persistence. Before we move on to our code let s take a look at the project window. There s some new stuff here you ve not seen before. Expand both the Classes and Resources folders see Figure 11-6 . Figure 11-6. Our project template with the files needed for Core Data File Name A s Code A 0. a Core Data Persistence.app Core_Data_Persistence-lnfo.plist D Core_Data_Persistence.xcdatamodel 7 1 Core_Data_Persistence_Prefix.pch 1 Core_Data_PersistenceAppDelegate.h Ml Core_Data_PersistenceAppDelegate.m 7 u CoreData.framework y CoreCraphics.framework ỵ A 0 Foundation.framework y Entities and Managed Objects Of course we have a bunch of files you re already familiar with an application delegate a MainWindow.xib and an info property list. But there s another file in the Resources folder called Core_Data_Persistence.xcdatamodel. That is our data model. Core Data lets us design our data models visually without writing code. Single-click that file now and you will be presented with the data model editor see Figure 11-7 . You may want to expand your Xcode window and hide the detail pane E while working with the data model editor. Download at Boykma.Com CHAPTER 11 Basic Data Persistence 381 Figure 11-7. Core Data s data model editor. This is where you an create and edit data models. The traditional way to create data models in Cocoa is to create subclasses of NSObject and conform them to NSCoding and NSCopying so that they can be archived as we did earlier in this chapter. Core Data uses a fundamentally different approach. Instead of classes you create entities here in the data model editor and then in your code create managed objects from those entities. IIP_ The terms entity and managed object can be a little confusing since both refer to data model

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.