灵活设计 iPhone App 布局重要吗? [英] Is it important to design iPhone App layouts flexible?

查看:24
本文介绍了灵活设计 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个单位.那么在制作一个界面不错的视图时,当用户在使用 App 时接听电话,并且状态栏的高度增加了会发生什么?或者,如果 Apple 在未来的某一天更改状态栏或标签栏的高度会怎样?

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天全站免登陆