0
votes

I'm having a main view with UIScrollview it's child and than another view as scrollview's child. After setting the scroll view's content size it's child view's height isn't increasing.

This is the hierarchy -MainView --Scrollview ---ContentView

i've set the scrollview's constraint as top bottom left right to 0. The content view's constraints are top bottom left right to 0 and equal width and height to main view. But the content view's height isn't increasing.

2
You should add some more details, like what you're trying to design.Mukesh

2 Answers

0
votes

The content view's constraints are top bottom left right to 0 and equal width and height to main view.

"...and height to main view"

That's it. Your content view's height is set to equal to the screen. Let the subviews of your scrollView (or subViews of your contentView) increase the total content height so that your scrollView could scroll vertically.

0
votes

Just remove the height constraint from child view. It will make width equal to main view's width and height equal to the height of content view of scroll view.