Modal View with Navigation Controller(带有导航控制器的模态视图)
本文介绍了带有导航控制器的模态视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
仍然无法弄清楚我做错了什么.只是想获得一个带有导航控制器的模态视图.
still cannot figure out what I am doing wrong. Just trying to get a modal view with a navigation controller inside.
这是我的项目http://www.matthewpateman.com/New.zip
谁能告诉我我做错了什么?我希望ShopModalView.xib"在导航控制器中弹出,但它只是显示一个空白页面......
Can anybody tell me what I am doing wrong? I want "ShopModalView.xib" to pop up in the navigation controller, but its just diplaying a blank page…
推荐答案
将其呈现为模态视图并将控制器包装在导航控制器中以提供导航栏,以防您想添加编辑、保存等按钮
Present it as a modal view and wrap the controller in a navigation controller to provide a navigation bar in case you want to add edit, save, etc buttons
ModalViewController *modalController = [[ModalViewController alloc] initWithNibName:@"ModalViewController" bundle:nil];
modalController.delegate = self; // Set any delegate you may have
// This is where you wrap the view up nicely in a navigation controller
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:modalController];
// You can even set the style of stuff before you show it
navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;
// And now you want to present the view in a modal fashion
[self presentModalViewController:navigationController animated:YES completion:nil];
这篇关于带有导航控制器的模态视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
沃梦达教程
本文标题为:带有导航控制器的模态视图


猜你喜欢
- 如何在 iPhone 模拟器中重置 NSUserDefaults 数据? 2022-01-01
- URL编码Swift iOS 2022-01-01
- GPS状态的广播接收器? 2022-01-01
- 类似于 Mail.app 的 iPad 模态视图控制器? 2022-01-01
- UITextView 内容插图 2022-01-01
- Xcode 7.3 中带有 UILabel 的 UIStackView 2022-01-01
- 在 Iphone SDK 的导航栏上添加多个按钮 2022-01-01
- SetOnItemSelectedListener上的微调程序错误 2022-01-01
- 使用自动布局向 UIScrollView 添加动态大小的视图 2022-01-01
- 网上有没有好的 UIScrollView 教程? 2022-01-01