6与约束按钮图像

6与约束按钮图像

本文介绍了X code 6与约束按钮图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我创建一个应用程序,有11图像的仪表板。

Hi guys I'm creating an app that have a dashboard with 11 images..

1的背景是,1是分割按钮和9与图像按钮的行。

1 is the background, 1 are the lines that divide the button and 9 are the button with images.

我试了几次用自动约束分配,但我也试过手动,我不能约束如何设置正确看着办吧。我也跟着很多教程。如果你看下面的图片,你可以看到按钮/图像尤其是在iPhone 4怪异!

I tried several times with the automatic constraints assignment but I also tried manually and I can't figure it out how to setup the constraints correctly. I followed also a lot of tutorial. If you watch the image below, you can see that the button/images especially in the iPhone 4 are weird!

推荐答案

你必须要包含一个按钮,一个视图....之后只要按照设定浏览限制下面的图片你有9张图像......我只给你7个按键演示

you have to take a view which contains a button....after that just follow the below image for set up view constraints...You have 9 images ...I just gave you demo with 7 buttons

和按钮也仅有4约束...我设置一个......你只需要遵循所有按钮...

and for button there is just 4 constraints...I setup for one...you just need to follow for all buttons...

这是结果的图片...

And here is the result image...

这篇关于X code 6与约束按钮图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 07:19