码迷,mamicode.com
首页 > 其他好文 > 详细

开发进阶03_UIView的常见属性

时间:2014-10-28 00:16:59      阅读:293      评论:0      收藏:0      [点我收藏+]

标签:style   color   ar   for   sp   strong   div   on   bs   

frame:类型是CGRect
    @property (nonatomic) CGRect frame;
    控件所在矩形框的位置和尺寸(以父控件的左上角为坐标原点)
 
bounds
    @property (nonatomic) CGRect bounds;
    控件所在矩形框的位置和尺寸(以自己左上角为坐标原点,所以bounds的x、y一般为0)
 
center
    @property (nonatomic)CGPoint  center;
    控件的中点位置(以父控件的左上角为坐标原点)
 
NSUInteger  === unsigned long
NSinteger ===  int
 
tag
    @property (nonatomic) NSinteger tag;
    控件的ID\标识。父控件可以通过tag来找到对应的子控件
 
superview
    @property(nonatomic,readonly)UIView *superview;
    获得自己的父控件对象
 
subviews
    @property(nonatomic,readonly,copy)NSArray *subviews;
    获得自己的所有子控件对象(新添加的子控件会在subviews数组的最后面)
 
 
transform:
    property(nonatomic) CGAffineTransform  transform;
    控件的形变属性(可以设置旋转角度,比例缩放、平移等属性)

开发进阶03_UIView的常见属性

标签:style   color   ar   for   sp   strong   div   on   bs   

原文地址:http://www.cnblogs.com/yaofch107/p/4055405.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!