uitabbar + navigationController
1)刪除故事版中默認(rèn)內(nèi)容毁枯,添加一個(gè)uitabbarController 并設(shè)置為initial controller
- 將默認(rèn)的controller刪除,添加2個(gè)navigationController,按住control拖至uitabbercontroller建立relationship
- 在controller里面bar item 設(shè)置title和image藐鹤,當(dāng)前選中樣式需要到代碼里面設(shè)置娱节,
例如:self.tabBarItem.selectedImage=[UIImage imageNamed:@"ts探索_sel"];
- 在controller里面bar item 設(shè)置title和image藐鹤,當(dāng)前選中樣式需要到代碼里面設(shè)置娱节,
4)建立內(nèi)容頁(yè)與navigationController的relationship祭示,用navigationController+control 拖至 內(nèi)容頁(yè)的controller
5)若某頁(yè)中不希望出現(xiàn)navigation 和 tabbar ,可以在controller中選擇hide button bar on push
代碼中設(shè)置隱藏:self.hidesBottomBarWhenPushed=YES;
這個(gè)方法要注意使用的位置稠歉,在跳轉(zhuǎn)前的控制器中使用,也可以用xxx.hidesBottomBarWhenPushed針對(duì)特定控制器