UIScrollView and Autolayout - Xcode
Why Stack Overflow recommends it
Stack Overflow users link it as the go-to visual tutorial for setting up UIScrollView with Autolayout constraints in a storyboard.
Recommended by 5 people across 4 different months, 2015 to 2018.
What it is
A 6-minute Xcode 6 walkthrough showing how to build a UIScrollView with Autolayout in Interface Builder. Content sits on top and a button is pinned to the bottom, scrolling only when the screen is too small, tested across iPhone 4, 5, 6 and 6 Plus.
What people said
Recommends Nirav Gadhiya · 2015-03 · Stack Overflow · on “Resize UIView inside UIScrollView with AutoLayout for scrolling?”
AutoLayout issues are very hard to explain with text. I was having the same problem. I found the solution in this video. hope this will help you too. [this video] This video demonstrates how to create a UIScrollView which has some views on the top of the screen and a view on the bottom of the screen in Autolayout. UIScrollView content size is automatically adjusted to the size of the screen or to the size of the content in such way that on smaller devices scrolling is active and on larger devices scrolling is not active because it is not needed. UIButton below UITextFields always stays on the bottom of the screen and everything works on all iPhone resolutions (iPhone 4 / 5 / 6 / 6 Plus).
Recommends Asadullah Ali · 2015-04 · Stack Overflow · on “Autolayout just not working for every screen size”
For Autolayout, you Consider the screen sizes you want to support. Which view/buttons/labels/imageview etc you want to remain fixed while in different screen size. Which view/buttons/labels/imageview etc can be scaled to fit the screen. Now if by scaling the things you can fit on the screen then you are good to go. But if you still can't find way then you would probably need to you use scrollview and and add a UIView (let's call it content view) to it put your all stuff in it and constraint them vertically all the way from top to bottom.This video can help you if you want to use scrollview [this video]
Recommends Gideon · 2015-04 · Stack Overflow · on “Autolayout UIScrollView not scrolling (in landscape)”
I am starting to lose my mind over this. Everything I try seems to make me fail to let a scrollview scroll properly. I am making a application to show a TCG card with some info gathered from a REST API, which for now looks like this (the other views are removed for testing purposes): Because of the image height, the TextView and Label will fall off in landscape mode, and it should be scrollable. This is my current structure (without constraints), based on this [this video] video: I have tried for literally hours to fiddle around with the constraints to get it work, but every time something breaks. Sometimes you get the awesome 'Scrollable Content Size Ambiguity' error, and if that is fixed, views
Recommends Sana · 2015-12 · Stack Overflow · on “How to make an UIScrollView work with Autolayout and dynamic content?”
AppsDev, check this video out it helped me a lot doing UIScrollView via storyboard [this video] Also never set the scrollView's contentSize as it has to be determined by scrollView on its own and that's why we have AutoLayout. I believe we should have one tag for uiscrollview-autolayout
Recommends Sana · 2015-12 · Stack Overflow · on “UIScrollView Scroll issue in Xcode 7.2 size classes”
You have to give the height and a low priority. Control drag the content view on to the view of the view controller as select the 'Equal Heights' option. See around 35 secs at this video [this video]
Recommends user5730430 · 2016-01 · Stack Overflow · on “How to add a UILabel inside a UIScrollView programatically?”
1.You have to use View(ContentView) to place the labels. 2.Add the ContentView into ScrollVIew. 3.Assign the ContentView Size whatever You Want Go Through This Link,You Will get a Clear idea. [this video] Remove scrollView = [[UIScrollView alloc] init]; this is not necessary.Please Upvote if it helps.
Cites g1465958 · 2015-04 · Stack Overflow · on “Size classes and scroll view - cannot handle with scroll view”
I am doing universal app with size classes. It looks pretty well on iPhones from 5 to 6 Plus. But I need a scroll for 4S. So I added a scroll view, I did it like advice here [this video] . But my scroll doesn't fix on iPhones 5-6Plus. It's scrolling a little bit. But I want it available on 4S only. I am doing with it more than one day, I've tried different kind of constraints but nothing helps. Could you give me some advice, please.
Cites Alexey Zakevich · 2015-05 · Stack Overflow · on “How to make uiscrollview only vertical scrolling for ios?”
I'm trying to make layout inside scrollview using this one tutorial link [this video] And get the following result link [LINK] It will be appreciated for any advices or tutorial links. It needs only vertical scrolling
Cites trandang · 2015-07 · Stack Overflow · on “How to use AutoLayout with UIScrollView”
I have a problem with the auto layout on an UIScrollView. I setup all my constraints exactly like shown in this video: [this video] (Until minute 1), but my screen looks like this: (the orange view is the scroll view and the white one is the content view). Does the NavigationBar cause this problem, or have I made a mistake?
Cites Alessandro Garcez · 2015-08 · Stack Overflow · on “UIScrollView and auto layout not working”
I'm trying to make a view scrollable in my app. O follow exactly the steps in tutorial [this video] . The main steps I did were: Add a UIscrollView Add a view into UIscrollView (Content View) Create the margin constraints with value 0 (top, left, right and botton) for UIScrollView Create the margin constraints with value 0 (top, left, right and botton) for Content view Create 2 constraints of "equal width" and "equal height" between ContentView and main view ... (Add some text fields) When I run the app, the scrollView doesn't work [LINK] I really can't make it work. I tried many ways to apply a UIScrollView and didn't get it.