Adding Tags to the Interface

When users navigate to a specific photo, they currently see only the title of the photo and the image itself. Let’s update the interface to include a photo’s associated tags.

Open Main.storyboard and navigate to the interface for Photo Info View Controller. Add a toolbar to the bottom of the view. Update the Auto Layout constraints so that the toolbar is anchored to the bottom of the screen, just as it was in LootLogger.

The bottom constraint for the imageView should be anchored to the top of the toolbar instead of the bottom of the superview. You will also want to lower the vertical content hugging priority on the image view to be lower than that of the toolbar. Add a UIBarButtonItem to the toolbar, if ...

Get iOS Programming: The Big Nerd Ranch Guide, 7th 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.