简体   繁体   中英

ios swift - scroll view over image doesn't scroll

I want to have a background image that does not move and have a scrollview over it that allows users to scroll through content while the back image remaining static.

I have tried adding an image to my view and then after a scroll view over it but I'm unable to scroll.

I'm trying to achieve an effect similar to this:

在此输入图像描述

Am I on the right path to achieving this?

You have to set contentSize for UIScrollView. ContentSize has to greater than frame size.

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