Creating our filter scroller 

After a user selects a photo to use, we present the user with a screen, which contains that image. In the following screenshot, we have a scroller, also known as a UIScrollView, which allows us to create content that scrolls either horizontally or vertically. The UIScrollView displays an image (thumbnail) with the filter applied to it as well as the name of the filter. This image and name represent our filters visually to our users.

When the user taps on the image, the user will see the selected filter change the primary image. Let's look at an example:

We are now going to create the elements inside the UIScrollView ...

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.