These properties, which are internally structured: CGRect cgpoint cgfloat
Background: All controls are sub-classes of view, the screen is a large view, each view has a viewcontroller, it is the view of the butler, each view corresponds to a viewcontroller, to manage the view.
Frame & Bounds & Center
========================================
1 > Frame can modify the object's position and size
2> Bounds can modify the size of the object
3> Center can modify the position of the object, which is the x, y coordinate of the center of the object
2. end-to-end animations
========================================
Beginanimations indicates that subsequent code will " participate in" the animation
[UIView beginanimations:nil context:nil];
Setanimationduration used to specify the duration of the animation
[UIView setanimationduration:2.0];
self. Headimageview.bounds = rect;
Commitanimations, commits and generates animations for all animations after beginanimation
[UIView commitanimations];
3. Transform Properties
========================================
In OC , you can modify the translation, scaling, and rotation angles of an object by using the transform property
Common methods for creating transform structures are divided into two main categories
1 > Create a deformation based on the initial position of the control
Cgaffinetransformmaketranslation
Cgaffinetransformmakescale
Cgaffinetransformmakerotation
2> create A " based on transform parameter " deformation, return the current coordinate value, do not need to always calculate, this is more commonly
So there will be one more parameter: the current control object;
Cgaffinetransformtranslate
Cgaffinetransformscale
Cgaffinetransformrotate
Add:
In OC , all values associated with the angle are in radians,°= m_pi
Positive number indicates clockwise rotation
Negative number indicates counterclockwise rotation
Tip: Because the transform property can be superimposed on the last state of the control, for example, rotate and then pan
Therefore, in the actual animation development, when it involves the position, the size deformation effect, mostly modifies the control's transform property,
frame bounds Center