I used to be making an attempt to create an onboarding UI utilizing UIKit and Storyboard. I had a requirement the place some components wanted to be static / sticky and a few components needed to scroll horizontally because the person swiped on the onboarding.
This could provide you with a greater thought:
To realize the above, I used the next view hierarchy arrange in storyboard
UIViewController
- Skip Button
- Container View containing a UIPageViewController to swipe horizontally
- UIViewController
- UIScrollView (That is one other scroll view, not the web page view controller’s)
- UIStackView
- UIImage (massive purple cross)
- UILabel
- UILabel
- UIStackView
- UIScrollView (That is one other scroll view, not the web page view controller’s)
- UIViewController
- UIStackView
- Web page Indicator
- Subscribe button
- Login button
Whereas this works wonderful in a traditional arrange, I’ve the necessity to help dynamic / giant textual content which the person can replace from settings / management panel.
The difficulty I’ve now’s that the content material grows throughout the scrollview contained in the UIPageViewController as proven
The white field above just isn’t a part of the UI however simply me making an attempt to point out that the vertical scrolling is restricted to that space.
I perceive that due to my arrange, that is the proper conduct.
My query / goal:
What can be a greater format construction in order that the entire view grows when bigger textual content fonts are activated such that the view scrolls as a complete somewhat than the scrolling being restricted to that small portion of the display which might be imply the web page indicator and backside buttons going under the display for bigger textual content sizes.
Please keep in mind that solely the picture, title and outline needs to be horizontally scrollable.
I attempted to convey the scrollview and stackview out of the PageViewController to arrange one thing like this:
UIViewController
- UIScrollView
- UIStackView
- Skip Button
- Container View containing a UIPageViewController to swipe horizontally
- UIViewController
- UIStackView
- UIImage (massive purple cross)
- UILabel
- UILabel
- UIStackView
- UIViewController
- UIStackView
- Web page Indicator
- Subscribe button
- Login button
- UIStackView
Nonetheless, since I am utilizing autolayout, I get an error within the storyboard that the web page view controller’s peak could not be decided.
What can be the proper technique to set this up in storyboard or programatically if not attainable by way of storyboard ?
I am open to switching to tableview or collectionview if that makes life simpler.