Common properties and methods of UIView
-(void) viewdidload{[Super Viewdidload]; Temporary view UIView *temp = [[UIView alloc] init]; Temp.frame = CGRectMake (0, 0, 100, 100); [Self.view addsubview:temp]; Common attribute//1 for UIView. Get your own parent control [temp Superview]; 2. Get all of your child control objects [temp subviews]; 3. The ID of the control is identified, and the parent control can find the corresponding child control through the tag value [temp settag:9999]; 4. The deformation properties of the control (you can set the rotation angle, scale, pan, and so on) Temp.transform = Cgaffinetransformmakerotation (m_pi_2); Rotation-this angle is the radian system M_pi m_pi_2 m_pi_4 ... A positive number is a clockwise negative number that is counterclockwise temp.transform = Cgaffinetransformmaketranslation (20,30); X-direction X-Direction Y-shift (plus or minus can control direction) Temp.transform = Cgaffinetransformmakescale (20,40); Zoom and expand//5 in the X and y directions. The position and dimensions of the control's rectangle box in the parent control (the origin of the coordinates in the upper-left corner of the parent control) [temp frame]; 6. The position and size of the control's holding box (the origin of the coordinates in its upper-left corner, so bounds X, Y is generally 0) [temp bounds]; 7. The position of the midpoint of the control (in the upper-left corner of the parent control is the coordinate origin), you can define the position of the control [temp Center]; The common method of UIView is//1. Add a child control//UIView *tempview = [[UIView alloc] init];//[selF.view Addsubview:tempview]; 2. Remove the [temp Removefromsuperview] from the parent control; 3. Find the corresponding control (typically a child control) based on a tag identifier [Self.view viewwithtag:9999];}
·
----ICode, love life.
Common properties and methods of UIView