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)