标签:
一定要设置这一个
view.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth;
有这么多枚举类型:
UIViewAutoresizingNone = 0, (无)
UIViewAutoresizingFlexibleLeftMargin = 1 << 0, (距离左边是可伸缩的,也就是在UIStoryBoard中把右边的线固定住)
UIViewAutoresizingFlexibleWidth = 1 << 1, (也就是把中间的横线勾选上)
UIViewAutoresizingFlexibleRightMargin = 1 << 2, (距离右边是可伸缩的,也就是在UIStoryBoard中把左边的线固定住)
UIViewAutoresizingFlexibleTopMargin = 1 << 3, (距离顶部是可伸缩的,也就是在UIStoryBoard中把下边的线固定住)
UIViewAutoresizingFlexibleHeight = 1 << 4, (也就是把中间的竖线勾选上)
UIViewAutoresizingFlexibleBottomMargin = 1 << 5 (距离底部是可伸缩的,也就是在UIStoryBoard中把上边的线固定住)
标签:
原文地址:http://www.cnblogs.com/fantasy3588/p/5244909.html