# Scroll View School · Auto Layout | raywenderlich.com

**URL:** <https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627>\
**Category:** 🎓 Courses & Articles\
**Created:** [November 29, 2018, 8:52pm UTC](https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627 "2018-11-29T20:52:00Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![jessycatterwaul](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jessycatterwaul/32/110937_2.png) [@jessycatterwaul](https://forums.kodeco.com/u/jessycatterwaul)\
**Post date:** [November 29, 2018, 8:52pm UTC](https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627/1 "2018-11-29T20:52:00Z")

</div>

* * *
This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/9223-scroll-view-school/lessons/9](https://www.raywenderlich.com/9223-scroll-view-school/lessons/9)

---

<div class="post-metadata">

**Author:** ![andreskwan](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/andreskwan/32/108642_2.png) [@andreskwan](https://forums.kodeco.com/u/andreskwan)\
**Post date:** [March 10, 2019, 7:43pm UTC](https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627/2 "2019-03-10T19:43:37Z")

</div>

Hi @catie and @jessycatterwaul!

Do you know if zooming can be done when we are using auto-layout to set the scrollView.contentSize?

I tried, without luck.

Thanks,

Andrés.

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [March 10, 2019, 9:57pm UTC](https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627/3 "2019-03-10T21:57:57Z")

</div>

@catie @jessycatterwaul Can you please help with this when you get a chance? Thank you - much appreciated! :]

---

<div class="post-metadata">

**Author:** ![catie](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/catie/32/110937_2.png) [@catie](https://forums.kodeco.com/u/catie)\
**Post date:** [March 19, 2019, 7:44pm UTC](https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627/4 "2019-03-19T19:44:17Z")

</div>

It can!

Try constraining an image view and scroll view like we do at the start of this video. Then, the only changes you should need to make to the Zooming code are:

1. Don’t set `imageView.frame.size` in `viewDidLoad`.
2. In `setZoomParameters`, use the size of the image instead of the image view. Replace `imageView.bounds.size` with `imageView.image!.size` (feel free to unwrap that safely, like a responsible person 😬)

If you want to implement centering, I believe you’d need to update the constraints instead of changing the content insets, but I haven’t tried it myself.

---

<div class="post-metadata">

**Author:** ![andreskwan](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/andreskwan/32/108642_2.png) [@andreskwan](https://forums.kodeco.com/u/andreskwan)\
**Post date:** [June 5, 2019, 4:45pm UTC](https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627/5 "2019-06-05T16:45:50Z")

</div>

Hi @catie! Thank you for your answer.

---

<div class="post-metadata">

**Author:** ![samsonngov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/samsonngov/32/81494_2.png) [@samsonngov](https://forums.kodeco.com/u/samsonngov)\
**Post date:** [August 14, 2019, 11:49pm UTC](https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627/6 "2019-08-14T23:49:48Z")

</div>

Hi Cathy and Jessy,

I was not able to add constraint to scrollview as the video, instead of having the scrollView fullpage I am having this result and error message. " Scrollable Content Size Ambiguity"

![image](https://files.chunter.kodeco.com/original/3X/2/6/262f5b71bd13cf65cedf0307ee2021208277e6c7.jpeg)

also under the scrollview, I am having " Content Layout Guide and Frame Layout Guide" which are not appearing in the tutorial.( probably due to a new version of X code)

I tried several time but still “stuck” at this place.  
Could you please let me know what went wrong and how to remediate to it ?

it will be greatly appreciated !!

With thanks and regards  
Samson

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [September 5, 2019, 11:46pm UTC](https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627/8 "2019-09-05T23:46:17Z")

</div>

@jessycatterwaul @catie Can you please help with this when you get a chance? Thank you - much appreciated! :]

---

<div class="post-metadata">

**Author:** ![catie](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/catie/32/110937_2.png) [@catie](https://forums.kodeco.com/u/catie)\
**Post date:** [September 6, 2019, 2:23am UTC](https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627/9 "2019-09-06T02:23:09Z")

</div>

Hi! First, you’ll need to add the Image View to the Scroll View. After that, the difference is you’ll constrain that Image View to the Content Layout Guide, not the Scroll View itself. That _should_ get rid of the errors you’re seeing :]

---

<div class="post-metadata">

**Author:** ![henc](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/henc/32/83609_2.png) [@henc](https://forums.kodeco.com/u/henc)\
**Post date:** [October 2, 2019, 12:35pm UTC](https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627/10 "2019-10-02T12:35:25Z")

</div>

Select the scrollView from the document outline, navigate to the size inspector and untick the box for Content Layout Guides.  
That should fix it.

---

<div class="post-metadata">

**Author:** ![jeannicolas](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jeannicolas/32/102075_2.png) [@jeannicolas](https://forums.kodeco.com/u/jeannicolas)\
**Post date:** [October 10, 2019, 2:26pm UTC](https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627/11 "2019-10-10T14:26:30Z")

</div>

![18](https://files.chunter.kodeco.com/original/3X/0/c/0c8be8dce3db9dfa2822f369dcabdb6be2543176.jpeg) see image ! MUST be constrained to Content Layout Guide. RW should update the tutorial for ios13.

---

<div class="post-metadata">

**Author:** ![catie](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/catie/32/110937_2.png) [@catie](https://forums.kodeco.com/u/catie)\
**Post date:** [October 12, 2019, 9:05pm UTC](https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627/12 "2019-10-12T21:05:45Z")

</div>

Thanks for your comment! This course is on our list to update :]  
For now, I’ve added an Author Note to this video.

---

<div class="post-metadata">

**Author:** ![saurabhtri](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/saurabhtri/32/110937_2.png) [@saurabhtri](https://forums.kodeco.com/u/saurabhtri)\
**Post date:** [May 1, 2020, 8:18am UTC](https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627/13 "2020-05-01T08:18:14Z")

</div>

hey @jessycatterwaul @jcatterwaul @catie thanks for making such a good tutorials , guys currently I’m using Xcode 11.4.1 and its not working even please help me.

---

<div class="post-metadata">

**Author:** ![catie](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/catie/32/110937_2.png) [@catie](https://forums.kodeco.com/u/catie)\
**Post date:** [May 5, 2020, 3:42pm UTC](https://forums.kodeco.com/t/scroll-view-school-auto-layout-raywenderlich-com/56627/14 "2020-05-05T15:42:22Z")

</div>

Hi! Take a look at the other questions people have asked on this episode. It may help you out!

I also added an author’s note to the episode:

**For Xcode 11 & iOS 13:**  
Constrain views within a Scroll View to the **Content Layout Guide** instead of the Scroll View itself.

Let me know if that helps you! :]
