4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rootViewControllerのときだけNavigationBarを非表示にさせる

Posted at

rootViewControllerに以下を設定。

rootViewController.swift
override func viewWillDisappear(animated: Bool) {
    navigationController?.setNavigationBarHidden(true, animated: true)
}

配下のViewControllerに以下を加えればできると思います。

SampleViewController.swift
override func viewWillDisappear(animated: Bool) {
    navigationController?.setNavigationBarHidden(true, animated: true)
}

override func viewWillAppear(animated: Bool) {
    navigationController?.setNavigationBarHidden(false, animated: true)
}
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?