我想让一个菜单从右侧滑入,一切正常,除了它一直滑到屏幕的左侧。即屏幕左侧和菜单边缘之间应该有一些距离,但距离为0。
这是我的配置:
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)
}
如何让它在我设置宽度的 320 距离内滑动?