目标C:自适应工具栏 [英] Objective C: Adaptive Toolbar

查看:60
本文介绍了目标C:自适应工具栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个不使用UIToolbar的工具栏,而是使用图像视图和UIButton,但是当我更改iPad的方向时,它们会保留在它们的位置.

I want to create a toolbar without using the UIToolbar, instead I used image views and UIButtons but when I change the orientation of my iPad they remain where they are positioned.

为什么我不使用UIToolbar?因为我的按钮间距存在问题,因为我希望它们彼此靠得更近,但是在UIToolbar上,空间还是很大的.

Why didn't I use UIToolbar? Because I am having problems with the spacing of my buttons, because I want them closer to each other but on UIToolbar the space are wide.

如果有一种方法可以更改间距,也许我会回到UIToolbar.

If there is a way to change the spacing maybe I'll go back to UIToolbar.

现在,我的问题是如何使图像视图和UIButton适应方向?

Now, my question is how can I make the image views and UIButtons adaptive to the orientation?

推荐答案

在界面构建器中的xib文件中,打开大小检查器.在那里,使用自动调整大小功能.正方形内的箭头用于调整选定视图的大小.广场外的合法性是关于获得起点的.您可以在那里更改原点的位置.只需使所有ypur对象随您所处的位置移动/调整大小即可.

In interface builder, in your xib file, open size inpector. There, use autosizing feature. arrows inside square are about resizing selected view. Liness outside of square are about getting origing point. You may allso change origin point's position there. just make all ypur objects to move/resize as you what there.

这篇关于目标C:自适应工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆