Swift基础入坑

TabBar

2018-06-11  本文已影响16人  iOS_July

一、了解一下

@1、tabBar也被称为选项卡,位于屏幕底部,用于划分功能块
@2、导航条:让用户在有层级关系的视图中浏览(页1->页2->页3)
@3、选项卡:管理关系不明显的视图集合,通常是功能分块

二、基本使用

@1、push时,隐藏选项卡:
//Hide Bottom Bar on Push
        if let pageVC = storyboard?.instantiateViewController(withIdentifier: "GuiderViewController") as? GuiderViewController {
            pageVC.hidesBottomBarWhenPushed = true
            present(pageVC, animated: true, completion: nil)
        }
@2、基本属性
tabBar属性.png
//选中时的背景
        UITabBar.appearance().selectionIndicatorImage = #imageLiteral(resourceName: "tabitem-selected")
上一篇 下一篇

猜你喜欢

热点阅读