如何将 UINavigationController 实现为标准 UIView
这是我当前应用程序的结构:
- UIWindow
- UIViewController(根视图控制器)
- UINavigationController
- UITableView
- UIViewController(PresentModalViewControllerAnimated:是)
- UITableView
- UIViewController(根视图控制器)
这就是我想要的样子:
- UIWindow
- UIViewController(根视图控制器)
- UINavigationController
- UITableView
- UIViewController(PresentModalViewControllerAnimated:是)
- UINavigationController
- UITableView
- UIViewController(根视图控制器)
我有一个向上滑动的视图,我希望该视图有自己的 UINavigationController。这是用于应用程序设置的,所以我想要嵌套选项。
有什么想法如何做到这一点?
应用程序类型是导航应用程序,它是根视图控制器的 UINavigationController 的来源。
This is the structure of my application currently:
- UIWindow
- UIViewController (Root View Controller)
- UINavigationController
- UITableView
- UIViewController (PresentModalViewControllerAnimated:YES)
- UITableView
- UIViewController (Root View Controller)
This is how I want it to be:
- UIWindow
- UIViewController (Root View Controller)
- UINavigationController
- UITableView
- UIViewController (PresentModalViewControllerAnimated:YES)
- UINavigationController
- UITableView
- UIViewController (Root View Controller)
I have a view that slides up and I want that view to have its own UINavigationController. It's for the app settings so I want to have nested options.
Any ideas how to do this?
The application type was a Navigation app to start with which is where the Root View Controller's UINavigationController came from.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请注意,
UINavigationController
继承自UIViewController
,因此您可以将其呈现为模式视图控制器。我创建了一个简单的测试应用程序,这种方法运行良好。呈现导航控制器:
然后从其层次结构中使用的任何控制器中消除模态控制器
Note that
UINavigationController
inherits fromUIViewController
so you can present it as a modal view controller. I've created a simple test application and this approach worked fine.To present navigation controller:
Then to dismiss modal controller from whatever controller in its hierarchy use