Mastering Auto Layout - Part 6: NSLayoutAnchor | Ray Wenderlich Videos

I have a question here, where are we defining the y position for the containerguide. I mean how does the auto layout system know where to place the containerguide.

That’s a fantastic question! :smiley_cat:

It’s an undocumented implementation detail! If you don’t constrain it, it will use “zero” values. Which means, in this case, it’s a rectangle with zero area, at the top of the screen.

Because a layout guide is non-rendering, that’s fine. We’re only relying on its horizontal properties, which, then, of course, have to be clearly defined.

Is the beginning auto layout guide you guys were talking about an article?

Where were we talking about this? My best guess is that you’re referring to the older versions of Layout in iOS.

You were talking about this in the introduction part of mastering auto layout tutorial. So i thought there was a beginner video tutorial rather than an article for auto layout so that i could refer to it rather than jumping right away for the mastering auto layout tutorial.

@prajwal544 Please check out our Auto Layout tutorial when you get a chance:

https://www.raywenderlich.com/811496-auto-layout-tutorial-in-ios-getting-started

I hope it helps!