简体   繁体   English

Picker视图约束iphone4 / iphone5

[英]Picker View constraints iphone4/iphone5

I have a picker view on ios7. 我在ios7上有一个选择器视图。 This picker view as at the bottom of the view controller. 该选择器视图位于视图控制器的底部。 On the iPhone 5 it displays fine, and its big enough to see the options in the picker view. 在iPhone 5上,它显示良好,并且足够大,可以在选择器视图中查看选项。

On the iPhone 4 it is too small to see the options in the picker view. 在iPhone 4上,它太小了,无法在选择器视图中看到选项。

I know I have to use constraints, but any idea which way to go with this one. 我知道我必须使用约束,但是任何想法都可以使用该约束。

The picker view is stuck to the bottom of the vc. 选择器视图固定在vc的底部。

thanks 谢谢

In storyboard, simply ctrl-click-drag to the view you want to make the constraint with like this: 在情节提要中,只需按ctrl-click-drag即可拖动到您要对其进行约束的视图,如下所示:

在此处输入图片说明

and then you can see all your constraints on the right side of Xcode: 然后您可以在Xcode的右侧看到所有约束:

在此处输入图片说明

In simple way. 以简单的方式。

Click on the picker and click on the " Add missing Constraints " 单击选择器,然后单击“ Add missing Constraints

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM