搜尋

首頁  >  問答  >  主體

iOS中使用hidesBottomBarWhenPushed,Pop的时候如何显示出TabBar?

A -> B | B -> A

在A中hidesBottomBarWhenPushed = YES,到B了TabBar就隐藏了。

当我从B Pop回来的时候,在ViewWillDisappear中hidesBottomBarWhenPushed = YES,Tabbar还是隐藏了的,怎么破?怎么让回来后Tabbar显示出来?

巴扎黑巴扎黑2773 天前667

全部回覆(3)我來回復

  • 迷茫

    迷茫2017-04-17 11:57:03

    經摸索和總結,出了一篇文,供參考:http://blog.segmentfault.com/isaced/1190000000327529

    回覆
    0
  • PHP中文网

    PHP中文网2017-04-17 11:57:03

    在viewWillAppear和viewWillDisappear的時候設定

    回覆
    0
  • 迷茫

    迷茫2017-04-17 11:57:03

    呃..竟然是這麼久的坑了..今天自己遇到了就來填一下好了, 根據文檔的介紹, hidesBottomBarWhenPushed
    就是A Boolean value indicating whether the toolbar at the bottom of the screen is hidden when the view controller is pushed on to a navigation controller. The value of this property on the topmost view controller determines whether the toolbar is visible. If the value of this property is , the tool Pis trueden. is false, the bar is visible. 重點在於topmost, 當你A壓B的時候, B將成為topmost view controller, 將B的hidesBottomBarWhenPushed設為true才是正解.

    回覆
    0
  • 取消回覆