ios-Data storage

Source: Internet
Author: User

1. Plsit Property List1>applicable to: only some of the classes that are in the foundation framework, such as Nsstring\nsarray\nsdicionary\nsset\nsnumber\nsdata2>call the WriteToFile of the object .... method to write to the file3>call the object's ... The Withcontentsoffile method allows you to read the contents of an object from a file2. Preference Settings1>Nature or the way the Plist property list is stored2>Access is simple*don't care about folders and filenames3>can only be stored in one file (cannot hold large amounts of data)3. Nscoding1>The ability to plug any object that complies with the Nscoding protocol into a file2>-(void) Encodewithcoder: (Nscoder *) Encoder*called when an object is archived (called before the object is written to the file)//in this way it is clear that://1. Which properties need to be stored//2. How to store these attributes3>-(ID) Initwithcoder: (Nscoder *) Decoder*called when an object is parsed from a file//in this way it is clear that://1. Which attributes need to be parsed (read)//2. How to parse (read) These attributes4>If there are attributes in the parent class that need to be archived or read, you must call Super's Encodewithcoder: and Initwithcoder: Method4. SQLite31>ideal for storing large volumes of data//INSERT into T_person (name, age) VALUES (' Jack ', ten);5. Core Data1> IOS5. 0 appears2> Inefficient (packaged with SQLite3)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.