gpt4 book ai didi

ios - navigationBar.IntrinsicContentSize.height 与实际栏的大小不匹配

转载 作者:行者123 更新时间:2023-11-28 06:15:32 25 4
gpt4 key购买 nike

我尝试使用包含位置的 CGRect 来设置组件的位置。

 pageMenu = CAPSPageMenu(viewControllers: controllerArray, frame: CGRect(x:0.0, y:(self.navigationController?.navigationBar.intrinsicContentSize.height)!, width:self.view.frame.width, height:self.view.frame.height), pageMenuOptions: parameters)

y 设置为 self.navigationController?.navigationBar.intrinsicContentSize.height

但是当我在模拟器上运行我的应用程序时,它会在导航栏下方显示菜单栏。我不知道为什么。我已经将 y 坐标设置为导航栏的高度。请帮忙。

enter image description here

这是我的 Storyboard。

enter image description here

最佳答案

为隐藏在导航栏下方的 View Controller 设置此项

viewController.edgesForExtendedLayout = []

关于ios - navigationBar.IntrinsicContentSize.height 与实际栏的大小不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45233228/

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