0
我在導航控制器內使用UIPageViewController。導航欄僅在用戶觸摸視圖時纔會顯示。現在我想在用戶滑動並更改頁面時隱藏導航欄。我怎麼做?我嘗試了下面的代碼,但它似乎沒有工作。隱藏頁面翻轉導航欄
let currentViewController = self.pageViewController!.viewControllers![0]
let viewControllers = [currentViewController]
self.pageViewController!.setViewControllers(
viewControllers,
direction: .Forward,
animated: true, completion: {
done in self.navigationController?.setNavigationBarHidden(true, animated: false)
})
燁試圖用戶到達頁面的viewWillAppear中方法..不工作 –