简体   繁体   English

导航栏不显示在弹出窗口内

[英]navigation bar doesn't show inside popup

I'm using the PopupDialog library and have a button inside it. 我正在使用PopupDialog库,并且其中有一个按钮。 when user click on this button, I want to open a view controller that has a navigation bar. 当用户单击此按钮时,我想打开一个带有导航栏的视图控制器。

my function inside PopupDialog controller : 我在PopupDialog控制器内的功能:

func cliclOnContent(tapGestureRecognizer: UITapGestureRecognizer)
{

    let storyboard = UIStoryboard(name: "Main", bundle: nil)
    let controller = storyboard.instantiateViewController(withIdentifier: "ContentAJobViewController") as! ContentAJobViewController
    controller.job_id = self.gh.id
    self.present(controller, animated: true, completion: nil)

}

but when my controller shows view ( ContentAJobViewController ), my navigation bar is hide: 但是当我的控制器显示视图( ContentAJobViewController )时,我的导航栏处于隐藏状态:

在此处输入图片说明

my library link: https://github.com/Orderella/PopupDialog 我的图书馆链接: https : //github.com/Orderella/PopupDialog

in order to keep the current navigation controller you must use self.show(controller, sender: self) . 为了保持当前的导航控制器,您必须使用self.show(controller, sender: self) But I don't understand where you are using the PopupDialog in this case. 但是在这种情况下,我不明白您在哪里使用PopupDialog。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM