English 中文(简体)
履历表 - 航行控制的最大条码
原标题:Storyboard - Hiding top bar of navigation controller programmatically

我用一个故事板和Im试图躲藏我主要导航控制器的顶部,而某个信道受到压力(或称职)。 我知道,我必须从一个故事板(使用识别器)中开始一个提及导航控制员的物体,但当我向这一新创建的物体发送了娜吉斯·巴哈普里特的信息时,没有任何真正的物体在屏幕上发生。

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UINavigationController *navController = (UINavigationController*) [storyboard instantiateViewControllerWithIdentifier:@"MyNavController"];

[navController setNavigationBarHidden:YES animated:YES];

谁知道问题是什么?

最佳回答

最后解决了这一问题。 你们总是要通过主计长来掩盖航道。

在我前面的提问中,我进行了全新的导航管理员,该机在屏幕上向真正的航道点开关。 你们可以通过观察控制者获得“真实”:

[viewController.navigationController setNavigationBarHidden:YES animated:YES];
问题回答

There are 2 ways to hide top bar of Navigation Controller:

(1) 方案

[self.navigationController setNavigationBarHidden:YES animated:YES];

2) 利用宇宙建筑商

你可以在导航主计长的财产名单上核对“导航律师协会”。

“entergraph

Please make sure you have selected scene which contain Navigation Controller. Example image of scene.
enter image description here

快速4:

self.navigationController!.navigationBar.isHidden = true

例如:

override func viewDidLoad() {
        super.viewDidLoad()
       self.navigationController!.navigationBar.isHidden = true
    }

我也面临同样的问题,这对我来说都是如此。

navController.navigation Bar.hidden = YES;

答案是正确的。 只想补充一点,你可能想在放弃其他观点可能使用这一看法时,以及在你为大家所隐藏的那种观点而藏匿时,放弃航条。

override func viewDidLoad() {
        super.viewDidLoad()
        self.navigationController?.navigationBar.isHidden = true
    }

在您离开之前:

override func viewWillDisappear(_ animated: Bool) {
      super.viewWillDisappear(animated)
      self.navigationController?.navigationBar.isHidden = false
}

......

In Xamarin.iOS

base.NavigationController.NavigationBarHidden = true;

我躲藏了我的航道,不检查“航行律师”在特工检查员中。 希望能帮助他人。

“entergraph

SetRootlyingViewController, after Changing the Property.

  UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];

// Create Navigation controller with RootViewController
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:[storyBoard instantiateViewControllerWithIdentifier:@"MyRootViewController"]];

2. 根基

 [appDelegate.window setRootViewController: navController];

或您

[self.navigationController setNavigationBarHidden:YES animated:YES];




相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签