Using Xcode 7.2 [using swift but that shouldn't matter for this] ... I have put two buttons, 'Done' and 'Add', into a UIStackView as such:
使用Xcode 7.2 [使用swift,但这对此无关紧要] ...我已将两个按钮'Done'和'Add'放入UIStackView中:
But at runtime the 'Add' button is always smaller as:
但在运行时,“添加”按钮总是较小,因为:
I have tried every combination of fill and spacing on the StackView, etc. I have tried setting widths and heights but the 'Add' button is always smaller. I have the same problem in another UIStackView (also horizontal) where the Add button is first.
我已经在StackView上尝试了填充和间距的每种组合。我尝试过设置宽度和高度,但“添加”按钮总是更小。我在另一个UIStackView(也是水平)中遇到了同样的问题,其中Add按钮是第一个。
The two buttons shown have the same natural pixel size and are multi-sized. For example here is the setting for 'Add':
所示的两个按钮具有相同的自然像素大小并且是多尺寸的。例如,这里是“添加”的设置:
I tried deleting it from Xcode and adding it back. Is there some factor that I am missing? This is driving me nuts.
我尝试从Xcode中删除它并将其添加回来。我缺少一些因素吗?这让我疯了。
One hint that might help is that I think that when I first added it with this name, it actually was smaller, but since then I have deleted it and re-included it in the project. Perhaps there is some 'memory' there that I can't find?
可能有帮助的一个提示是,我认为当我第一次使用此名称添加它时,它实际上更小,但从那时起我删除了它并将其重新包含在项目中。也许那里有一些我找不到的“记忆”?
1 个解决方案
#1
0
Ack, thanks so much for the answers and comments. But the problem was that the '@2x' Add image was misscaled. Fixing that fixed the problem; only took me days to find it as I guess I checked and rechecked the 1x and 3x sizes but never the 2x one. Sorry to waste your collective time.
艾克,非常感谢你的回答和评论。但问题是“@ 2x”添加图片被缩略图。解决了解决问题的方法;我只花了几天时间才发现它,因为我猜我检查并重新检查了1x和3x尺寸,但绝不是2x尺寸。抱歉浪费你的集体时间。
I am still not very comfortable with all the layout settings and have 6 storyboards in the app that have around 60 layout warnings, but am getting there.
我对所有布局设置仍然不太满意,并且在应用程序中有6个故事板,有大约60个布局警告,但我到了那里。
#1
0
Ack, thanks so much for the answers and comments. But the problem was that the '@2x' Add image was misscaled. Fixing that fixed the problem; only took me days to find it as I guess I checked and rechecked the 1x and 3x sizes but never the 2x one. Sorry to waste your collective time.
艾克,非常感谢你的回答和评论。但问题是“@ 2x”添加图片被缩略图。解决了解决问题的方法;我只花了几天时间才发现它,因为我猜我检查并重新检查了1x和3x尺寸,但绝不是2x尺寸。抱歉浪费你的集体时间。
I am still not very comfortable with all the layout settings and have 6 storyboards in the app that have around 60 layout warnings, but am getting there.
我对所有布局设置仍然不太满意,并且在应用程序中有6个故事板,有大约60个布局警告,但我到了那里。