gpt4 book ai didi

iphone - UIScrollView 位于页面中间?

转载 作者:行者123 更新时间:2023-11-29 04:37:18 24 4
gpt4 key购买 nike

我正在为我的应用程序开发 UI,需要页面中间的 UIScrollView 中的一些内容。我在主视图中设置了一个 UIView (a)。像这样

enter image description here

我在同一个 xib 中有另一个 UIView,其中 UIView(b) 中有 uiscrollview,如下所示:

enter image description here

现在当我设置以下内容时:

[a addSubview:b];

UIView a 的作用如下:

enter image description here

请帮我解决这个问题。

最佳答案

如果您希望它滚动到第二个按钮,您需要在代码中设置 ScrollView 的 contentSize。看看这个问题的答案:How I auto size a UIScrollView to fit the content

关于iphone - UIScrollView 位于页面中间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10903700/

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