简体   繁体   English

Jonkykong开发的SideMenu-从右侧滑入

[英]SideMenu by jonkykong - slide in from right side

I want to have a menu slide in from the right and everything is working correctly except it slides all the way to the left side of the screen. 我想从右边插入菜单幻灯片,并且一切正常,除了它一直滑动到屏幕的左侧。 That is, there should be some distance between the left side of the screen and the edge of the menu, but the distance is 0. 也就是说,屏幕的左侧和菜单边缘之间应该有一些距离,但是该距离为0。

Here's my configuration: 这是我的配置:

let rightSideMenu = NavigationUtility.viewController(NavigationConstants.kSlideMenuNavigationController) as? UISideMenuNavigationController
rightSideMenu?.sideMenuManager.menuPresentMode = .menuSlideIn
rightSideMenu?.navigationController?.setNavigationBarHidden(true, animated: false)
rightSideMenu?.menuWidth = 320
rightSideMenu?.sideMenuManager.menuWidth = 320
rightSideMenu?.sideMenuManager.menuShadowRadius = 30
rightSideMenu?.sideMenuManager.menuShadowOpacity = 0.5
rightSideMenu?.sideMenuManager.menuShadowColor = Colors.menuShadowColor

SideMenuManager.default.menuRightNavigationController = rightSideMenu
if let navBar = self.navigationController?.navigationBar {
    SideMenuManager.default.menuAddPanGestureToPresent(toView: navBar)
}
if let navView = self.navigationController?.view {
    SideMenuManager.default.menuAddScreenEdgePanGesturesToPresent(toView: navView)
}

How can I make it slide in just the distance of 320 that I set the width to? 如何使其在设置宽度的320距离内滑动?

I think the issue was related to working with an outdated version of SideMenu. 我认为问题与使用过时的SideMenu版本有关。 Once I ran a pod update it began working as expected. 一旦我运行了pod更新,它就会按预期开始工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM