Search code examples
iosiphoneuiscrollviewautolayoutxcode-storyboard

UIScrollview is not scrolling beyond UIView height even though UIView frame is increased


I am trying to create a screen where scrolling is required in iphone 3.5 inch screen . I have attached images which contain the configuration of uiviewcontroller , uiscrollview , uiview . The problem is eventhough the height seems to increase , when i run iPhone 4s , some part of scroll is hidden beyond the UIView (Although uiview height shows 700 when i print the height in console) . What might be the problem ? Please help me ?enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here


Solution

  • Thanks for the information and suggestions . Now it is working correctly . What i did is

    1. set scroll view top ,left , right , bottom aligned to superview

    2. Set content view of scroll view to top , left , right , bottom aligned to scrollview

    3. set the content view of the scroll view to "Equal Heights" and "Equal widths" to the top superview.

    4. Then i set the equal height constraint to have low priority of 250

      Now i can scroll whenever required based on the size of the phone screen :)