设计iPhone App布局是否重要? [英] Is it important to design iPhone App layouts flexible?

查看:121
本文介绍了设计iPhone App布局是否重要?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道当我在固定值的neb中设置我的视图的高度时是否会遇到麻烦。

I am wondering if I would run into troubles when setting the heights of my views in the neb with fixed values.

示例:状态栏的高度已知。它是20个单位。因此,当做一个视图显示一个漂亮的界面,当用户在使用应用程序打电话时会发生什么,状态栏的高度增加?

Example: The height of the Status Bar is known. It's 20 units. So when making a view that shows an nice interface, what would happen when the user takes a phone call while using the App, and the Status Bar increases in height? Or what if Apple changes the height of the Status Bar, or Tab Bar, some day in future?

你总是使用自动调整功能为你的容器视图,所有的一切,如果苹果改变状态栏的高度,界面元素里面?你的模式是什么?

Do you always use autoresizing features for your container-view that has all the interface elements inside? What's your pattern?

推荐答案

我会避开状态栏,工具栏等高度的硬编码值你的程序。您提供了一些好的例子,说明这些值是如何动态的,并且可以在将来改变。您可能或可能不支持的另一个常见情况是用户将iPhone旋转到横向。

I would steer clear of hard coding values for the heights of the status bar, tool bar, etc into your program. You present some good examples of how these values are dynamic and can change in the future. One other common scenario that you may or may not be supporting is the ability of the user to rotate the iPhone into landscape orientation.

我总是尝试保持容器的子视图的布局灵活。使用自动调整功能是一个很好的方法。你的问题是一个好的,我认为它会让我审查自己的布局策略!

I always try to keep the layout of the subviews of a container flexible. Using the autoresizing feature is a good approach. Your question is a good one and I think its going to make me review my own layout strategy!

这篇关于设计iPhone App布局是否重要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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