gpt4 book ai didi

ios - 当放置在 TabBarController 中时,按钮会出现在 View 之外,否则不会出现?

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:40:29 26 4
gpt4 key购买 nike

奇怪的问题,我似乎无法解释为什么会发生...

我设计了一个简单的 View Controller 。设置在 UIScrollView 中。

Interface Builder view of ScrollView and UIView with content

当在 UITabBarController/NavigationController 之外呈现时,一切正常。

当放置在 UITabBarController/NavigationController 中时,UIButton 似乎最终位于其容器的 View 之外,因此不会触发任何代码。我完全不知道为什么。

Picture of "Save Likes" button sitting outside the view and hence not triggering to events

我已将背景涂成蓝色和绿色以表明我的意思(现在我可以上传照片了!)

我似乎可以在 objective-c 中毫无问题地处理困难的事情。简单的东西?混淆了我的生活。 UITableViews 仍然是我的克星,紧随其后的是 UITabBarController/NavigationController

跟调整大小有关系吗?自动布局?看不出为什么它在“正常”呈现时有效,但是在 UITabBarController/NavigationController 中,事情就出错了!

感谢那些能够为我指明正确方向的人!

最佳答案

试试这个:在 Interface Builder 中转到您的 View Controller 并打开模具属性检查器。在那里,禁用“在顶部栏/底部栏下扩展边缘”。

enter image description here

关于ios - 当放置在 TabBarController 中时,按钮会出现在 View 之外,否则不会出现?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21014921/

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