ios - SideMenu 未使用屏幕的整个高度
<p><p>我正在使用 <a href="https://github.com/jonkykong/SideMenu" rel="noreferrer noopener nofollow">this library</a>使用 Swift 4 在 iOS 中创建侧边菜单。</p>
<p>但是,这仅适用于 iPhone SE 或 5S 等较小的屏幕。在 iPhone 6 等更大的屏幕上,这不起作用,因为侧边菜单不会一直延伸到屏幕底部:</p>
<p> <img src="/image/yIWRhl.png" alt="screenshot of side menu that doesn't go all the way down"/> </p>
<p>我在 <code>MainViewController</code> 中创建侧边菜单的代码:</p>
<pre><code>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)
</code></pre>
<p>带有 SideMenu 的 ViewController:</p>
<p> <img src="/image/RMeuY.png" alt="storyboard screenshot"/> </p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>尝试设置前导、顶部、底部和宽度约束。 </p></p>
<p style="font-size: 20px;">关于ios - SideMenu 未使用屏幕的整个高度,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/50710699/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/50710699/
</a>
</p>
页:
[1]