Http://www.mamicode.com/info-detail-308725.html
The difference between Alpha and opaque
Alpha is used to describe the transparency of the change view from 0 to 1,0, and 1 for opaque. Alpha supports animation (animation), alpha = 0 and hidden = yes effect are not visible, but the latter is much more expensive than the other. The touch event is accepted at Alpha equals 0 o'clock, but hidden is not accepted. and hidden and opaque do not support animations. Alpha does not affect tessellation in its internal view behavior, and hidden affects it. When the view is set to a transparent background, opaque is generally set to no, which reduces overhead and optimizes memory. Opaque affects the drawing system. Set to Yes to optimize the drawing of the view.
3,nil,nsnull,null differences
Nil is a null pointer to an object in Obj-c and is an object in which the Nil object invocation method in O-c does not cause crash.
Nil is a null pointer to the class in Obj-c, which represents an empty class.
Null is a pointer to any type of NULL, such as a null pointer in C + +, and is a numeric value in Objective-c.
Nsnull is used for collection operations, which represent a collection object in a collection object that represents a null value.
4.KVC and KVO
KVC (key-value-coding) Key-value encoding is a mechanism for indirectly manipulating object properties, which can be set to a value. Access and access to attributes is achieved through Setvalue:forkey: and Valueforkey.
KVO (key-value-observing) Key-value observation is an observer pattern used to observe changes in attributes to notify registered observers. By registering the observing object AddObserver:forKeyPath:options:context: And the Observer class must override the methodobserveValueForKeyPath:ofObject:change:context:。常应用MVC模型中,数据库(dataModal)发生变化时,引起view改变。
21. Application Life cycle and status (refer to: http://blog.csdn.net/totogo2010/article/details/8048652)
Not running running program does not start
Inactive inactive The program is running in the foreground, but no events are received. In the absence of event handling, the program usually stays in this state
The active activation program runs in the foreground and receives the event. This is also a normal mode of the front desk
Backgroud daemon in the background and can execute code, most programs enter this state will stay in this state for a while. The time will then go into the suspended state (Suspended). Some programs can be in Backgroud state for a long time after special request
The Suspended suspend program cannot execute code in the background. The system automatically turns the program into this state and does not give notice. When suspended, the program is still in memory, when the system memory is low, the system will remove the suspended program, to provide more memory for the foreground program.
is the program state change diagram:
iOS Essential Knowledge points