码迷,mamicode.com
首页 > 移动开发 > 详细

IOS autosizing(设置控件的固定位置大小)

时间:2017-03-22 15:04:13      阅读:210      评论:0      收藏:0      [点我收藏+]

标签:blog   auto   elf   otto   flex   log   set   固定   super   

 

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    /*
     UIViewAutoresizingNone                 = 0,  什么都没有设置
     UIViewAutoresizingFlexibleLeftMargin   = 1 << 0, // 代表距离左边的距离是不确定的, 也就是说距离右边的距离是固定
     UIViewAutoresizingFlexibleWidth        = 1 << 1,
     UIViewAutoresizingFlexibleRightMargin  = 1 << 2, // 代表距离右边的距离是不确定的, 也就是说距离左边的距离是固定
     UIViewAutoresizingFlexibleTopMargin    = 1 << 3,
     UIViewAutoresizingFlexibleHeight       = 1 << 4,
     UIViewAutoresizingFlexibleBottomMargin = 1 << 5
     */
    self.view.autoresizingMask =  UIViewAutoresizingFlexibleRightMargin;
}

 

IOS autosizing(设置控件的固定位置大小)

标签:blog   auto   elf   otto   flex   log   set   固定   super   

原文地址:http://www.cnblogs.com/liuwj/p/6599920.html

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