Is it important to design iPhone App layouts flexible?(灵活设计 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 布局重要吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:灵活设计 iPhone App 布局重要吗?


- Android viewpager检测滑动超出范围 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01