IOS item屬性總結

來源:互聯網
上載者:User

標籤:屬性   round   item   margin   導航控制器   sel   ios   model   選項   

 

一、UINavigationItem
1> 獲得方式
self.navigationItem // self是指控制器

2> 作用
可以用來設定當前控制器頂部導覽列的內容
// 設定導覽列中間的內容
self.navigationItem.title
self.navigationItem.titleView

二、UIBarButtonItem
1> 用在什麼地方
// 設定導覽列左上方的內容
self.navigationItem.leftBarButtonItem
// 設定導覽列右上方的內容
self.navigationItem.rightBarButtonItem

2> 作用
相當於一個按鈕

三、UITabBarItem
1> 獲得方式
self.tabBarItem // self是指控制器

2> 作用
可以用來設定當前控制器對應的選項卡標籤的內容
// 標籤的標題
self.tabBarItem.title
// 標籤的表徵圖
self.tabBarItem.image
// 標籤的選中表徵圖
self.tabBarItem.selectdImage

四、UINavigationBar
1. 導航控制器頂部的欄(UI控制項)
2. UINavigationBar上面顯示什麼內容, 取決於當前控制器的navigationItem屬性
3. UINavigationBar是view, navigationItem是model
4. 由navigationItem給UINavigationBar提供顯示的資料

五、UITabBar
1. UITabBarController底部的選項卡條

六、UITabBarButton
1. UITabBar底部的每一個標籤
2. 每一個UITabBarButton裡面顯示什麼內容,取決於當前控制器的tabBarItem屬性
3. UITabBarButton是view, tabBarItem是model
4. 由tabBarItem給UITabBarButton提供顯示的資料

 

 

IOS item屬性總結

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.