您的位置:首页 > 其它

停靠模式

2016-02-19 09:28 218 查看
停靠模式

当父视图改变时 子视图跟着改变

在xib中修改autosizing

手写代码:

@property(nonatomic) UIViewAutoresizing autoresizingMask; // simple resize. default is UIViewAutoresizingNone

设置UIView的这个属性 枚举 6个值

xib的布局适配

通过设置停靠模式 来等比例拉伸等

横竖屏是依赖设置停靠模式

@property(nonatomic) UIViewAutoresizing autoresizingMask; // simple resize. default is UIViewAutoresizingNone

_playView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: