gpt4 book ai didi

ios - SideMenu 左侧未使用屏幕的整个高度

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:02:41 25 4
gpt4 key购买 nike

我正在使用 this library使用 Swift 4 在 iOS 中创建侧边菜单。

但是,这仅适用于较小的屏幕,例如 iPhone SE 或 5S。在 iPhone 6 这样的大屏幕上,这不起作用,因为侧边菜单不会一直向下延伸到屏幕底部:

screenshot of side menu that doesn't go all the way down

我在 MainViewController 中创建侧边菜单的代码:

let menuLeftNavigationController = storyboard!.instantiateViewController(withIdentifier: "LeftMenuNavigationController") as! UISideMenuNavigationController
SideMenuManager.default.menuWidth = 260
SideMenuManager.default.menuLeftNavigationController = menuLeftNavigationController
SideMenuManager.default.menuFadeStatusBar = false
SideMenuManager.default.menuPresentMode = .menuSlideIn
SideMenuManager.default.menuAnimationFadeStrength = 0.5
SideMenuManager.default.menuShadowOpacity = 0.8

// open with present
self.present(SideMenuManager.default.menuLeftNavigationController!, animated: true, completion: nil)

带有侧边菜单的 View Controller :

storyboard screenshot

最佳答案

尝试设置前导、顶部、底部和宽度约束。

关于ios - SideMenu 左侧未使用屏幕的整个高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50710699/

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