什么是使用storybaords时以编程方式调整子视图的需要? [英] what is the need to resize subviews programatically when using storybaords?
问题描述
我也有自定义视图精通。今天我用故事板和放大器开始;我无法说服自己对故事板的使用。
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.
问题:
- 我在故事板设立的视图控制器。
- 运行模拟器上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,选择每一个用户界面元素,并设置其自动调整大小类似这样的。
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.
这篇关于什么是使用storybaords时以编程方式调整子视图的需要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!