0

UIScrollview scroll is not working when i tested application in device (iPhone 5), But scroll is working properly in iPhone 5/5s/6/6 Plus simulator. I am developing application using Xcode 6 and UIStoryboard with AutoLayout.

I set the top, bottom, left and right constraints of UIScrollview with relative to Superview. And i also set the constraints of every UIControl which is in the UIScrollview.

Has any one have solution regarding this issue?

Please see below screenshot for reference.

enter image description here

Pradhyuman Chavda
  • 3,814
  • 4
  • 16
  • 24
  • Try this one ,it should help. http://stackoverflow.com/questions/18751742/uiscrollview-doesnt-scroll-after-upgrading-to-ios7-xcode-5 – ltzMaxwell Oct 23 '14 at 08:02

2 Answers2

0

It's probably easiest to have the scroll view contain a single view, which then contains all of your scrollable content. That single view should be anchored to all 4 sides of the scroll view, and if it's only meant to scroll vertically (which is what your screenshot makes it look like), then set the content view to be the same width as the parent of the scroll view.

NRitH
  • 13,441
  • 4
  • 41
  • 44
0

To make sure an UIScrollView scroll, you have to check

  1. Size

Your content View is bigger than your Scroll View. If you want it to be scrolled vertically, make sure its higher; horizontally, wider.

  1. Constraints

Make sure your Scroll View is pinned to its super view, Top, Bottom, Leading, Trailing.

Make sure your Content view of Scroll View DOES NOT have CenterY constraint set to Scroll View, cause that'd make content view stuck with Scroll View and it'd never be able to scroll. (That happens to me the last time I was stuck)

  1. Interface Builder settings

Make sure the check in Interface Builder under Scroll View is checked: Scrolling section, Scrolling Enabled.

Joanne
  • 1,226
  • 13
  • 15