Adding Auto Layout to the Explore header

Working with Auto Layout can be very frustrating. If it does not work correctly, I recommend that you clear all the constraints and start over.

Let's begin by adding Auto Layout to our Label subtitle, which is where we should show the currently selected location:

  1. Select the View, that we are using as a container and then the Pin icon. Enter the following value:

  1. Click Add 4 Constraints.
  2. Select the Label subtitle and then the Pin icon. Enter the following values:
  1. Click Add 4 Constraints. Your constraints ...

Get iOS 12 Programming for Beginners - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.