使用情节提要板时,需要以编程方式调整子视图的大小吗? [英] What is the need to resize subviews programmatically when using storyboards?

查看:54
本文介绍了使用情节提要板时,需要以编程方式调整子视图的大小吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我非常熟悉自定义视图.今天,我开始使用情节提要&我无法使自己相信情节提要的使用.

I am well versed with custom views. Today I have started using storyboards & I am not able to convince myself on the usage of storyboard.

问题: -我已在故事板中使用View Controller进行设置. -在4英寸的模拟器上运行,我很乐意采用视图"的布局. -在3.5英寸的模拟器上运行时,我很沮丧,因为我的视图部分可见.

Problem: - I have set up by View Controller in storyboard. - Running on simulator 4 inch, I am good to Go with the layouts of Views. - Running on simulator 3.5 inch, I am upset, as my view is partially visible.

以下是屏幕截图.

  • 我的SotryBaord(查看删除用户"按钮).

  • My SotryBaord (Look at the "Delete User" Button).

删除用户按钮框:

在4英寸模拟器上运行

在4英寸模拟器上运行(我有问题)

如何调整框架的布局,使其在两种尺寸的iPhone上都清晰可见.我的删除用户按钮不应显示在屏幕上.

推荐答案

配合,自动布局有些复杂,您需要花很多时间来掌握它,但是如果要在几分钟内完成,只需取消选中自动-layout,选择每个UI元素并设置其自动调整大小,例如.

Mate, Auto layout is somewhat complex, you need to master it while giving lot of time, but if you want to finish it in minutes, just uncheck the auto-layout, select every UI element and set its auto-resizing like this .

您可以不同地更改自动布局,只需点击此按钮即可查看更改.

You can change the auto-layout differently, and can see the changes by just tapping this button

希望这会有所帮助并节省时间.

Hope this will help and save time.

这篇关于使用情节提要板时,需要以编程方式调整子视图的大小吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆