2

This worked perfectly before. Here is my view hierarchy.

enter image description here

I've set contentSize property, but on iOS7 scrollview is not scrolling at all

enter image description here

Jacek Kwiecień
  • 12,397
  • 20
  • 85
  • 157

3 Answers3

1

Actually the better way is to use pure autolayout approach which contains:

  • scrollview has all side constraints bound to superview
  • container view (inside scrollview) has all side constraints bound to superview (which is scrollview)
  • additionally container view has height and width constraints set to the dimensions of scrollview

And that's it, works like a charm.

Jacek Kwiecień
  • 12,397
  • 20
  • 85
  • 157
0

I think you had set some scroll frame in the .m class ,and try to give the scroll content size in .m class.If you had set the frame in .m it may be get conflict.

Romance
  • 1,416
  • 11
  • 21
0

After many project, I finally found the solution (or maybe is there a bug correction from Apple).

What you just have to do is to add a constraint to the "bottom Space to Superview" (ex. to 20). Like this, iOS know what is the content height.

Good example : UIScrollView doesn't scroll after upgrading to iOS7 / xcode 5

Programatically,

Léni.

Community
  • 1
  • 1
Léni
  • 1
  • 3