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, just as it was in Homepwner. The bottom constraint for the imageView should be anchored to the top of the toolbar instead of the bottom of the superview. Add a UIBarButtonItem to the toolbar, if one is not already present, and give it a title of Tags. Your interface will look like Figure 23.5.

Figure 23.5  Photo Info View Controller ...

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