ios - 滑动时未加载 jonkykong 的侧边菜单(适用于 ios swift 3 的库)

标签 ios swift3

我正在使用这个库 https://github.com/jonkykong/SideMenu 打开问题没有帮助

当我的应用程序首次启动时,我从左向右滑动以弹出侧边菜单,我看到黑屏

当我选择菜单项并且它有 subview Controller 时,我转到那个子 Controller ,然后我返回,然后执行第 1 步导致侧边菜单困惑 - 显然出了问题。

信息:如果侧边菜单是 UIimageView,则蓝色背景在整个 View 中延伸,具有纵横比填充,所以我不知道它是如何显示为图像 block 的 我该如何解决?谢谢

Storyboard截图:

初始导航 Controller http://joxi.net/eAOGGOVuPkBVAo

带有 subview Controller 的案例 http://joxi.ru/xAe66odUGXwPry

YouTube 视频链接 https://youtu.be/PRk-WsShGlM

最佳答案

您可能没有以编程方式正确设置菜单。来自自述文件:

let menuLeftNavigationController = UISideMenuNavigationController(rootViewController: YourViewController)
menuLeftNavigationController.leftSide = true
// UISideMenuNavigationController is a subclass of UINavigationController, so do any additional configuration 
// of it here like setting its viewControllers. If you're using storyboards, you'll want to do something like:
// let menuLeftNavigationController = storyboard!.instantiateViewController(withIdentifier: "LeftMenuNavigationController") as! UISideMenuNavigationController
SideMenuManager.menuLeftNavigationController = menuLeftNavigationController

关于ios - 滑动时未加载 jonkykong 的侧边菜单(适用于 ios swift 3 的库),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41712077/

相关文章:

ios - 在 SKSpriteNode 中暂停一项操作,同时运行另一项操作

iphone - 不显示 UITextField 内容的 MessageUI 框架问题

swift - 当用户已经通过身份验证时,它会在转到 MainController 之前显示 LoginViewController 大约半秒钟

swift - 如何消除同名类型和模块的歧义?

ios - UIViewControllerAnimatedTransitioning 未触发

ios - 无法在 Swift 2 中将类型 '__NSCFNumber' 的值转换为 'NSString'

objective-c - 创建一个包含 float 的全局数组

iphone - 如何将 JSON 数据成功转换为 Objective-C 对象?

ios - 如何获取当月的开始日期和结束日期(Swift 3)

ios - Swift 3 登录函数