a few things to know (a)A: Start interface---------1. Program startup will automatically load the image called default
- 1> 3.5inch non-retain screen: Default.png
- 2> 3.5inch Retina screen: [email protected]
- 3> 4.0inch retain screen: [email protected]
- 4>4.70inch retain screen: [email protected]
- 5>5.50inch retain screen: [email protected](Close to 3x have the opportunity to summarize)
2. Only images that are automatically loaded when the program starts will automatically be found in 4inch retina [email protected]
Two: Control summary---------
A control is invisible to the naked eye, and what is possible
- 1. No instantiation of this control is created at all
- 2. No size set
- 3. The color of the control is the same as the background color of the parent control (it is actually displayed, but invisible to the naked eye)
- 4. Transparency Alpha <= 0.01
- 5.hidden = YES
- 6. Not added to the parent control
- 7. Blocked by other controls
- 8. Wrong position
- 9. The parent control has the above situation
- 10. Special Circumstances
- * Uiimageview does not set the Image property, or the picture name is not set
- * Uilabel text is not set, or the text color is the same as the background color of the parent control
- * Uitextfield text is not set, or no border style is set BorderStyle
- * Uipagecontrol does not set the total number of pages, does not display small dots
- * UIButton internal ImageView and Titlelabel frame have been tampered with, or ImageView and Titlelabel have no content
- * .....
Suggestions for adding a control (debugging Tips):
- 1. It's best to set the background color and size
- 2. Control colors try not to be the same as the parent control's background color
Three: block and weak simple summary
The API reference has the following explanations for the __block variable modifier:
The approximate meaning comes down to two points:
- 1. The__block object can be modified and re-assigned in the block.
- 2.__block objects are not strongly referenced by block in block, so there is no circular reference problem.
API reference to
__weakVariable modifiers are explained in the following places:
- __unsafe_unretained typeof (self) weakself = self; //mrc __weak Uiviewcontroller *weakself =self;
- __weak typeof (self) weakself = self; ARC
An object that uses the __weak modifier is equivalent to the property defined as weak. Nature does not cause circular reference problems, because the Apple documentation has made it clear that when the original object does not have any strong references, the weak reference pointer is also set to nil.
So
__blockAnd
__weakThe difference between modifiers is actually quite obvious:
- 1.__block can be used in either ARC or MRC mode, can be decorated with objects, and can be decorated with basic data types.
- 2.__weak can only be used in Arc mode, can only be decorated with objects (nsstring), and cannot be decorated with basic data types (int).
- 3. The__block object can be re-assigned in the block,__weak not.
- The ps:__unsafe_unretained modifier can be considered an alternative to iOS SDK version __weak , but will not be automatically empty to nil. So do not use this modifier as much as possible.
iOS development--a few things to know (i)