Common attributes of the UI control and common attributes of the UI control

Source: Internet
Author: User

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 ................................

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.