iOS:SWRevealViewController 和多个 NavigationControllers

标签 ios objective-c iphone swrevealviewcontroller

我是 iOS 开发的新手,我一直在寻找一种在我的应用程序中使用的侧边菜单技术(类似于 android 中的 NavigationDrawer)在我的研究中,SWRevealViewController Controller 给我留下了深刻的印象,但我遇到了这个问题:

主题:SWRevealViewController

问题:我希望当用户点击一个单元格(在侧边菜单 TableView 中)时转到另一个 View 场景,并让这个场景也能够显示侧边菜单(与原始 View 场景完全一样)。

可能:我是否必须创建另一个 Root View 并制作两个自定义转场,一个与另一个侧边菜单链接,另一个与另一个导航 Controller 链接,就像我在原始 View 场景中所做的那样? (这是非常蹩脚的解决方案)

引用:请看下图

我的问题:应该用什么代替下图中标记为问题的 View 场景?

提前致谢。

Storyboard screenshot

最佳答案

不应该有从你的侧边栏 Controller 到任何其他 View Controller 的转接。而不是在侧边栏 Controller didSelectRowAtIndexPath 中,您应该创建 targetviewcontroller(取决于索引路径),然后使用

显示它
self.revealViewController pushFrontViewController:targetViewController animated:YES;

如有不明之处欢迎随时提问。 :)

关于iOS:SWRevealViewController 和多个 NavigationControllers,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30079329/

相关文章:

ios - 来回更改 UIImages

iphone - 使用核心图形 : bubbles are shown 绘制线条时出现问题

iphone - 将 C++ 代码重写为 Objective C

ios - 使用 MKAnnotation 的自动属性合成警告

objective-c - 需要选择存储我的 ios 数据的最佳解决方案

iphone - 从 SearchBar 查询执行 NSRange 后抛出的异常

objective-c - iOS 5 : Make NSString Category include NSCFConstantString?

ios - 无法编辑 UITableViewCell y 偏移量

ios - StatusBar 文本颜色在 iOS 7 中没有改变

iphone - "The binary you uploaded was invalid. the file was not a valid zip file"将应用程序上传到 iTunes Connect 时出现错误消息