UIScrollView with Autolayout - IOS 7 Xcode 5 Tutorial

Muhammed Tanrıverdi · 82K views · 2014 · 1:31

Open on YouTube

Software (other)UX & UI designtutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering why a UIScrollView will not scroll or size its content under Auto Layout, since it shows a working constraint setup without turning Auto Layout off.

Recommended by 5 people across 4 different months, 2014 to 2016.

What it is

A 1.5 minute screencast showing how to set up a UIScrollView with Auto Layout constraints in Xcode 5 for iOS 7. The presenter, Muhammed Tanrıverdi, walks through the constraint setup in Interface Builder.

What people said

Recommends Riddie · 2014-05 · Stack Overflow · on “Why is my UIView within UIScrollView not scrolling?”

Possible Issue Autolayout is on, and it won't let scrollview work as required. Possible Solution Check for autolayout of storyboard and untick it. If you dont want to set it to off, you can follow this short video which is wonderfull to deal scrolling with autolayout. :) UIScrollView with autolayout on [this video]

Recommends raurora · 2014-05 · Stack Overflow · on “UIScrollView not appearing on run”

@TomG103 I found this guy, he did not disable `AutoLayout` but still solved the solution - his video [this video] .

Recommends CarlosGz · 2014-09 · Stack Overflow · on “Embedding UIScrollView in UIContainerView”

It would be helpful to see the configuration and your Autolayout constraints. For similar cases, I usually use a configuration as described in this video: [this video]

Recommends Dharmendra Chaudhary · 2015-03 · Stack Overflow · on “Scrollview with View loaded from xib”

Your problem is with the view who is immediate subview of your scrollview.In autolayout,scrollView calculate its content size according to its subview. follow these steps after removing all constarints from this view,i hope u will get your problem solved. 1.for your scroll view,set all 4 constraints i.e leading edge,trailing edge,superview and bottom constraints. 2.now for the view that is immediate subview to your scrollview,set all 4 constraints (leading,trailing,top and bottom),along with these set height constraints and make width equals to scrollview. if your immediate subview's height is greater than your screen size or scrollview,it will scroll for sure. run and check whether you are

Recommends ghashi · 2016-10 · Stack Overflow · on “UIScrollView doesn't update properly, shows empty view randomly”

I think you're not using a UITableView. It seems you're just using a UIScrollView, right? In that case, if you set your constraints right, then it shouldn't be necessary to implment `computeAndFixHeight`. Check this video to see if you set your constraints right: [this video]

Cites Greeso · 2014-10 · Stack Overflow · on “UIScrollView with AutoLayout and without 'width' constraint”

I am creating an app, in which, I like to create a UIScrollView that will contain a number of other views that extend beyond the screen size. The size of the content inside UIScrollView is not something I have control over, and is downloaded from the web, and hence I am using UIScrollview. As described in a number of sites, and as demonstrated in this video [this video] , it is possible to set a UIScrollView with AutoLayout enabled (it is important to me to have AutoLayout enabled). Now, the problem is, there is a 'width' constraint added to the subview as shown in the video link above. For me, I like to have that constraint removed (to be able to support multiple widths). If I remove the width c