Paging Horizontally with vertical scrolling on each page!

In my application, I use the page control and UIScrollView for a horizontal page, I would like to be able to enable vertical scrolling on each page. Now I know that you can nest UIScrollViews to achieve this, however there is one problem in my project. Each of the pages uses a view controller, consisting of a view, with a background image (a different image for each page). This background image should not move when scrolling up and down.

Now what I want is the ability to have buttons, regular straight buttons that I create in Interface Builder (since I want to be able to design and update positions easily) and which can then be scrolled vertically.

So it should be like this:

You see a screen with pagination at the bottom, above it an image with buttons above it. When you scroll the side, you go to another page, again with an image (another) and with different buttons. Now, when you scroll vertically on the page, the buttons should be scrollable (so I can have many buttons on 1 page), but the image should support its position.

So, I get it, I'm just adding another scroll view at the top of the view with a background image. This works fine, since now I have buttons hovering over the background image, and I have a separate nib file for each page, including buttons. But when I do this like this, a scrollview with buttons becomes invisible vertically. I do not know why this is happening, so can someone suggest me how to achieve the desired result?

I would really be grateful!

Thank,

Fabian

+3
source share

Source: https://habr.com/ru/post/1768457/


All Articles