gpt4 book ai didi

ios - 当另一个 UIViewController(在 UINavigationController 内)显示时,UIViewController 不调整内容插入

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

我有一个导航 Controller ,它的根是一个 View Controller (称之为 First)。这个 First View Controller 有一个按钮,当按下该按钮时,会显示另一个 View Controller (称为 Second)。第二个 View Controller 有一个覆盖整个 View 的 UITextView。

在 Storyboard中,UITextView 中的示例文本正确地从标题栏下方(但不是下方)开始。换句话说,它的内容插图设置正确。

但是,当我运行应用程序并点击第一个 View Controller 的按钮以显示第二个 View Controller 时,文本位于标题栏下方。 TextView 的内容插入为零。

为什么 TextView 的顶部内容插入没有自动调整以适应标题栏?

我创建了一个显示问题的“最低限度”应用程序:https://github.com/redcurry/TestContentInsets .

注意:我使用的是 Xamarin,但我想在 iOS 中也会出现同样的问题(我还没有测试过)。

最佳答案

在第二个 View Controller 中,请取消选中“Adjust ScrollView Insets”复选框。 Please see the screenshot

关于ios - 当另一个 UIViewController(在 UINavigationController 内)显示时,UIViewController 不调整内容插入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43130885/

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