gpt4 book ai didi

ios - 无法在我的 iOS 应用程序中滚动

转载 作者:行者123 更新时间:2023-11-28 13:03:20 26 4
gpt4 key购买 nike

我是创建 iOS 应用程序的新手,目前我正在学习 Apple 的入门教程。

The application so far

他们建议在具有相当大屏幕的 iPhone 6 上进行模拟,因此所有内容都适合其屏幕,但我在具有较小屏幕的 iPhone 4 上进行模拟。所有内容都不适合,我看不到所有占位符图像。我希望我能够自动滚动以便能够查看所有内容,但没有。

iPhone 4 simulator

最佳答案

看来您是在普通 View 上设计了您的内容。相反,您必须使用 UIScrollView,这将允许您滚动查看所有内容。 contentSize 属性对此很重要。

引用这里:https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIScrollView_Class/

The UIScrollView class provides support for displaying content that is larger than the size of the application’s window. It enables users to scroll within that content by making swiping gestures, and to zoom in and back from portions of the content by making pinching gestures.

关于ios - 无法在我的 iOS 应用程序中滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33368642/

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