简体   繁体   English

重复使用带有故事板的xib(将UIView添加到UINavigationcontroller)

[英]Reused xib with storyboard (add UIView to UINavigationcontroller)

I have one xib contain some controllers. 我有一个xib包含一些控制器。 how to add UIView to UINavigationcontroller programmatically. 如何以编程方式将UIView添加到UINavigationcontroller

can you please help. 你能帮忙吗?

Thanks 谢谢

You just have to drag and drop UIView in your IB and outlet it and set 您只需要将UIView拖放到IB中并将其出口并设置即可

self.navigationItem.titleView = youroutletview; 

在此处输入图片说明

Now you can customize view as you want. 现在,您可以根据需要自定义视图。

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

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