Common attributes of the UI control and common attributes of the UI control
Common Properties of UIView:
// Obtain its parent control object @ property (nonatomic, readonly) UIView * superview; // obtain all its child control objects @ property (nonatomic, readonly, copy) NSArray * subviews; // Control ID \ ID. The parent control can use tags to find the corresponding subcontrol @ property (nonatomic) NSInteger tag; // control deformation attributes (you can set attributes such as rotation angle, proportional scaling, and translation) @ property (nonatomic) CGAffineTransform transform;
// Position and size of the rectangle of the control in the parent control (with the coordinate origin in the upper left corner of the parent Control) @ property (nonatomic) CGRect frame; // The position and size of the rectangle where the control is located (the coordinate origin is in the upper left corner of the control, so the x \ y of bounds is usually 0) @ property (nonatomic) CGRect bounds; // The position of the control's midpoint (with the upper left corner of the parent control as the coordinate origin) @ property (nonatomic) CGPoint center;
• In UIKit, the origin (0, 0) of the coordinate system is in the upper left corner. The x value is in the forward direction to the right, and the y value is in the forward direction to extend the common attributes of UILabel:
// The text displayed by the label @ property (nonatomic, copy) NSString * text; // The text font size @ property (nonatomic, retain) UIFont * font; // text color @ property (nonatomic, retain) UIColor * textColor; // text arrangement (left-aligned, center-aligned, right-aligned) enumerated value @ property (nonatomic) NSTextAlignment textAlignment; // set the number of rows (the number of rows = 0 indicates automatic line feed) @ property (nonatomic) NSInteger numberOfLines;
Common Properties of UIImageView:
// The image to be displayed @ property (nonatomic, retain) UIImage * image; // sets the sequence Frame Animation array (playing the images in the animationImages array in order) @ property (nonatomic, copy) NSArray * animationImages; // duration of the sequence Frame Animation @ property (nonatomic) NSTimeInterval animationDuration; // number of executions of the sequence Frame Animation (0 by default, representing an infinite loop) @ property (nonatomic) NSInteger animationRepeatCount;
Common attributes of UIScrollView:
// Indicates the rolling position of UIScrollView @ property (nonatomic) CGPoint contentOffset; // indicates the content size of UIScrollView (the scrolling range) @ property (nonatomic) CGSize contentSize; // Add an additional edge rolling area of UIScrollView @ property (nonatomic) UIEdgeInsets contentInset; // proxy @ property (nonatomic, assign) id <UIScrollViewDelegate> delegate;
Several common attributes of UIScrollView are introduced.
To be continued ................................