gpt4 book ai didi

ios - Swift SideMenu 显示 View Controller

转载 作者:搜寻专家 更新时间:2023-10-31 22:12:18 24 4
gpt4 key购买 nike

所以我有一个 TableView Controller 并使用 https://github.com/jonkykong/SideMenu我正在尝试显示一个有效的“滑入”侧边栏,但它没有显示我想要在侧边栏中看到的 View 是黑色的

enter image description here

// Define the menus
let menuLeftNavigationController = UISideMenuNavigationController()
menuLeftNavigationController.leftSide = true
// UISideMenuNavigationController is a subclass of UINavigationController, so do any additional configuration of it here like setting its viewControllers.
SideMenuManager.menuLeftNavigationController = menuLeftNavigationController

// Enable gestures. The left and/or right menus must be set up above for these to work.
// Note that these continue to work on the Navigation Controller independent of the View Controller it displays!
SideMenuManager.menuAddPanGestureToPresent(toView: self.navigationController!.navigationBar)
SideMenuManager.menuAddScreenEdgePanGesturesToPresent(toView: self.navigationController!.view)

当它点击侧边栏按钮时我有这个,它创建动画但不显示 View Controller

func someAction(){
present(SideMenuManager.menuLeftNavigationController!, animated: true, completion: nil)
debugPrint("clicked")
}

enter image description here

最佳答案

在 repo readme 上,你会找到你的答案,看看 Customization 节https://github.com/jonkykong/SideMenu#sidemenumanager .

只需设置 menuFadeStatusbar = false

SideMenuManager.default.menuFadeStatusBar = false

从前面的链接中,您会发现以下信息:“在状态栏后面绘制 menuAnimationBackgroundColor。默认为 true。如果 menuFadeStatusBar 为真,则使用此颜色淡化它。默认为黑色。”

关于ios - Swift SideMenu 显示 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41804386/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com