`
janedoneway
  • 浏览: 585970 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

iPhone开发中经常用到的控件尺寸大集合

 
阅读更多

From: http://www.cocoachina.com/bbs/read.php?tid=59387&page=1

 

Sizes of iPhone UI Elements



Element Size (in points)
Window (including status bar) 320 x 480 pts
Status Bar
(How to hide the status bar)
20 pts
View inside window 
(visible status bar)
320 x 460
Navigation Bar 44 pts
Nav Bar Image /
Toolbar Image
up to 20 x 20 pts (transparent PNG)
Tab Bar 49 pts
Tab Bar Icon up to 30 x 30 pts (transparent PNGs)
Text Field 31 pts
Height of a view inside 
a navigation bar
416 pts
Height of a view inside 
a tab bar
411 pts
Height of a view inside 
a navbar and a tab bar
367 pts
Portrait Keyboard height 216 pts
Landscape Keyboard height 140 pts
Points vs. Pixels
The iPhone 4 introduced a high resolution display with twice the pixels of previous iPhones. However you don't have to modify your code to support high-res displays; the coordinate system goes by points rather than pixels, and the dimensions in points of the screen and all UI elements remain the same.
iOS 4 supports high resolution displays (like the iPhone 4 display) via the scale property on UIScreen, UIView, UIImage, and CALayer classes. If the object is displaying high-res content, its scale property is set to 2.0. Otherwise it defaults to 1.0.
All you need to do to support high-res displays is to provide @2x versions of the images in your project. See the checklist for updating to iOS4 or Apple documentation for Supporting High Resolution Screens for more info.
Adjusting Sizes
Click here to see how to adjust View Frames and Bounds.
Additional References

 

分享到:
评论

相关推荐

    C# WM wince UI集合版(7 IN 1)

    这个集合中的7个源码实例很可能涵盖了以下关键知识点: 1. **事件驱动编程**:C#中的事件处理机制是构建用户界面的基础,通过事件监听和处理,可以实现用户交互,如按钮点击、屏幕滑动等。 2. **控件布局管理**:...

    iOS 5 iPhone App Develop Sample

    本章将介绍使用Interface Builder设计UI,包括控件的使用(如按钮、标签、文本框等),以及Auto Layout和Size Classes,确保应用在不同屏幕尺寸上表现良好。 3. **Chapter 4 - 数据管理**:iOS 5引入了Core Data,...

    iphone(Objective-C)

    在实际开发中,我们常常会用到Foundation框架,它包含了基本的数据类型、集合类(如NSArray、NSDictionary)、线程管理等核心功能。UIKit框架则是iOS开发的核心,提供了界面构建和用户交互的接口,如...

    ios几大框架汇总

    iOS 几大框架汇总 iOS 框架是一个目录,这个...此外还有其他一些重要的框架,如 Core Animation 框架和 OpenGL ES 框架,它们都是 iOS 开发中经常用到的框架。了解这些框架可以帮助开发者更好地开发 iOS 应用程序。

    九宫格(iPhone源代码)

    这两种组件都是苹果提供的用于显示可滚动数据集合的视图控件。对于九宫格,UICollectionView更为灵活,因为它允许更复杂的布局,比如自定义单元格大小和排列方式。 在描述中提到的“点击有提示,可以改变标签文字”...

    Axure适合新手的17个组件库

    最后的"小图标.rplib"是通用的小图标集合,包含各种日常设计中可能用到的元素。 这些组件库覆盖了原型设计中的多个方面,无论是基础的界面元素,还是复杂的交互动作,都有相应的图标供设计师选择。对于Axure的新手...

    IOS应用源码——一个选择器特效大全的例子:KNMultiItemSelector.zip

    9. 响应式设计:源码可能考虑了不同屏幕尺寸和设备方向的适配,确保在iPhone和iPad上都能良好显示,并且在横屏和竖屏之间能平滑切换。 10. 版本控制:作为开源项目,KNMultiItemSelector可能使用Git进行版本控制,...

Global site tag (gtag.js) - Google Analytics