简体   繁体   中英

Can't scroll in my iOS application

I'm pretty new in creating iOS applications and currently I'm following Apple's starter tutorial.

到目前为止的申请

They suggest simulating on iPhone 6 which has a pretty big screen and therefore all the content fit its screen, however I'm simulating on iPhone 4 which has a smaller screen. All the content don't fit and I can't see all of the placeholder image. I'd expect that I would automatically be able to scroll so I'm able to view all the content but no.

iPhone 4模拟器

It seems that you have designed your contents on normal view. Instead you have to use UIScrollView which will allow you to scroll to see all your contents. contentSize property is important for this.

Refer Here: 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM