0

I have attempted to search for AutoLayout, Contraints and several other items, but I can't seem to find an easy answer to what appears to be a simple issue. Below are two screenshots. The first one is a 4" iPhone in Storyboard, the second is the 3.5".

At the bottom, I have a "UIView" that sits on top of all the other layers and will only pop-up when I hit a "share" button. See my problem? I want to maintain the same size for the UIView on both the 3.5" and 4". As you can see, it grows and doesn't look as good on the 4" screen. What settings need adjusted in order to make this happen. I know it's going to be a constraint setting.

iPhone 4

iPhone 3.5

4

1 回答 1

3

只需选择 black top UIView,然后在 IB 窗口中添加一个高度约束。为此,请在窗口右下角搜索“Pin”菜单,然后选择“Pin Height”。

Xcode 引脚菜单

这告诉 Xcode 您希望视图始终保持相同的高度。请注意,这可能会使您的视图的先前约束之一无用(在我的情况下,我删除了“顶部空间”)。

于 2013-05-19T17:59:01.367 回答