iOS Design mode-Memo (continuous update)

Source: Internet
Author: User

Content outline

    • How to store Records
    • Basic principles of Memo mode
    • Optimized storage Solutions
    • Reply to the status of UIView
1. How to store Records

When storing records, the first step is to use a key to open a lock. The second step, when we open the lock there will be a black box, we do not know what is in the beginning, so it is a black box.

1, the necessity of storing records

生活中,比如去超市购物有时候就需要在入口储物柜存放自己的包裹

2, the record of the unique mark

储物柜对应一把钥匙和号码标示。

3. Store records and take Out Records

===============================================================================================

According to the mind map above: The memo mode is: 1. Has a key value (unique identifier) 2. Gets the storage item corresponding to key 3. Objects that can store diversity.

UML diagram for Memo mode:

2. Memo Mode

Originator a Cause, origin, creator, initiator, object: Ability to generate status values for a memo center Memento souvenir, record, Memo Center, ability to store or remove values from the state values in the notes generated by the object caretaker the gatekeeper, The memo center has items in a black box.

设计存储中心,比如超市里的储物柜指定存储接口,实现存储机制,
3. Optimized storage Solution

In addition: Fastcoding is a dedicated tool for local serialization, storage speed is more than the system built-in serialization scheme, but also very useful, can directly convert ordinary objects into NSData for direct storage, than our own written storage through a An object to inherit nscoding implement some methods to store a lot of scenarios well, recommended to use. The only requirement for this fastcoding is that, in the case of the entire project being arc, this fastcoding needs to be changed to MRC via the command (FNO-OBJC-ARC) because the fastcoding is the most efficient in the MRC without memory management.

4, reply to the status of UIView

iOS Design mode-Memo (continuous update)

Related Article

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.