1.UIKit和其他框架
- UIKit提供了用戶接口控件,比如button,label等,另外也管理view controllers和app的UI。
- Foundation是另外的框架,提供了組建APP所需要的基本元素,例如CoreGraphics用于劃線和圖片顯示等,AVFoundation用于播放video和聲音等。
- 所有組成IOS的框架,被稱為 CocoaTouch。
2.關于橫豎屏和屏幕像素
2.1關于像素
設備 | 尺寸 | 點陣數 |
---|---|---|
iphone4s及之前設備 | 3.5“ | 320/480 |
iphone5系列 | 4” | 320/568 |
iphone6 | 4.7“ | 375/667 |
iphone6s | 5.5” | 414/736 |
ipad | 7.9“or9.7" | 768/1024 |
在iphone4及以后的設備中,一個點陣代表的像素有復數個,iphone4中一個點陣有2×2個像素點,在iphone6s中是3×3個像素。但是在UIKit中,處理的都是以point為單位的,與像素點無關,所以作為開發來說,不需要關心。像素點是設計師要考慮的事情。
2.2修改橫豎屏
在AttributeInspector中,將viewControllerde的Orientation修改為landscape.