IOS7 UI Transition Guide 部分摘要 中文版

1. icon 更新到iphone:120X120. ipad:152x152

2. 開機畫面要添加回status bar

3. view controller 用full-screen layout

4. 重新設計bar button 圖標

5. 按鈕要使用無邊化

6. 使用相對佈局,auto layout,儘量不要寫死座標和大小

7. 用戶可自定義字號,字號可調整

8. 注意底部手勢的使用,蘋果優先響應系統的控制面板

9.儘量去特效化去物理化,保持界面元素平滑和層次感

10. 儘量使用storyboards

11. 在application:didFinishLaunchingWithOptions:
裏判斷版本 6 or 7 來載入相關資源

12. 進度和選中狀態的window.tintcolor 是應用到整個view,包括subviews.IOS7用barTintColor設置一個bar的背景

13. 自動調整字體字號,dynamic type,用UIFontpreferredFontForTextStyle去拿一個字體

14. 狀態爛透明,其它bar都是半透明的
  UIBarPositionTopAttached
代表bar背景延伸到status bar,圖像要64像素高, UIBarPositionTop代表不延伸,所有bar的按鈕都是無邊際的

15.status bar,白底黑字:UIStatusBarStyleDefault
黑底白字:UIStatusBarStyleLightContent

16. Navigation Bar 默認是半透明,底部有1像素的hairline, tintColor去定義barbutton,用barTintColor去定義bar 背景。如果要用自定義的返回按鈕,需要做一個MASK圖像作爲切換過渡用。 NaviBar的下部陰影要用自定義圖像和shadowImage來定義,不要用過長的帶陰影部分的圖像來做陰影,因爲在IOS7上,多出的像素會首先放到statusbar

17. 搜索欄,用tintColor定義引導文字foreground,用barTintColor來定義搜索欄的背景。IOS7可以在UISearchDisplayController裏面的displaysSearchBarInNavigationBar特性,做到把搜索欄集合在NaviBar上面,具體參考系統自帶的日曆應用
Scope bar範圍bar不會自動顯示,需要綁定到search bar,tint定義方法同搜索欄類似

18. Tab Bar在ipad上是56像素,用itemPositioning來定義佈局,在中央佈局時,可以用itemWidth和itemSpacing來自定義佈局,tintColor定義選擇的items,barTintColor定義背景。可以是使用selectedImageproperty來自定義選中狀態的圖像

19. Toolbar ,tintColor定義item,barTintColor定義背景,在top邊有一條1像素hairline(貌似和別的幾個bar有不一樣,它們多少底部),UIToolbarPosition已經棄用了,用UIBarPosition代替

20. barbuttons,使用圖像有2種方式UIImageRenderingModeAlwaysTemplate(默認使用),UIImageRenderingModeAlwaysOriginal(使用它來設定不是用tinting)

21. activity view controller裏的圖標要用黑白和透明度表示,抗鋸齒處理,不要用dropshadow。圖標大小是70x70居中

22. Ios7 的ImageView包含tintColor特性,在UIImageRenderingModeAlwaysTemplate模式下,tintColor會應用到該圖片上

23. 在Ios7上,用MKOverlayRenderer在mapview上創建overlay,3D地圖內容參考MKMapCamera

24.IOS7上,用pageViewControllerPreferredInterfaceOrientationForPresentation和pageViewControllerSupportedInterfaceOrientations控制pageview

25. iPad上有popover來顯示過渡頁面,背景半透,同時內容是貼邊的

26. ScrollView外觀上稍有變化,可以用automaticallyAdjustsScrollViewInsets特性管理srollview 

27.table view在iOS7裏變動比較大,cellseparator更細更窄更淺色,同時是從左邊開始插入。index默認是白底半透,header的文本顯示用all-capitalletters
和footer文本顯示用sentence-style
,可以用UITableViewHeaderFooterView來自定義樣式;
 cell組別擴展到整個屏幕寬度,cell選中狀態是淡灰底。如果每個cell都有相同尺寸的圖像,ios默認自動放置分隔,如果使用混合使用文本和圖像,可以用separatorInset(UIEdgeInsets的特性)自定義。

28. text view和webview變動不大,需要注意的是用UIFont裏的preferredFontForTextStyle
取得頁面的字體

29.像添加,詳細信息,標籤,頁面控制,時間選擇器,進度條(進度條的顏色可以用trackTintColor設置)
,菊花,加減,切換按鈕等元素有相當大的變化,

30.圓角按鈕IOS7中已經不顯示邊框,並且用UIButtonTypeSystem代替之前的UIButtonTypeRoundedRect
,(IOS6樣式的在新系統裏自動轉換)

31. Segmentedcontrol分節控制在IOS7裏只有簡單的樣式,以前的segmentedControlStyle的特性已經不用了

32.slider在ios7裏面可以用minimumTrackTintColor,maximumTrackTintColor, andthumbTintColor分別設定最小值顏色,最大值顏色,和觸摸時顏色。如果設定成nil,就使用默認

33. 切換按鈕在ios7裏面動感十足,可以用onTintColor, tintColor, andthumbTintColor設置開關和觸摸樣式

34. actionsheet在ios7裏面是一個半透的背景加上無邊按鈕。應用現在運行的用戶自定義樣式的as會被棄用,無論如何都是用IOS7的默認樣式。在initWithTitle:delegate:cancelButtonTitle:destructiveButtonTitle:otherButtonTitles:方法裏面的destructiveButtonTitle系統默認是紅色

35. Alert在ios7裏面也強制要使用默認樣式,如果你提供第三個按鈕,將在默認2個按鈕的上方顯示

發佈了28 篇原創文章 · 獲贊 22 · 訪問量 20萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章