Any other method to resize views, other than Auto-layout

China☆狼群 提交于 2019-12-13 05:46:47

问题


I am building an app, exclusively for iPhones and it only has a Portrait view. I have never used autolayout before and I don't think I have time to learn it now. Can I use anything else, to have my views resize themselves for the devices(iphone 4s, 5/5s, 6/6+)?


回答1:


Remove the autolayout and sizeclasses

And use autoresizing form utilities

You can also do it by code :

view.autoresizingMask = (UIViewAutoresizingFlexibleWidth |    
                              UIViewAutoresizingFlexibleLeftMargin);


来源:https://stackoverflow.com/questions/30252284/any-other-method-to-resize-views-other-than-auto-layout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!