While building apps, we will often need to include resources, such as images. How can we do the same with playgrounds so that our UI can incorporate these images? That is what we will investigate in this recipe.
We will improve our bar chart custom view from the previous recipe by adding a semi-transparent image to provide a texture for the bars.
Getting ready
For this recipe, we will start with the playground from the previous recipe. The playground is called Simple_iOS.playground, and you can get it from the GitHub repository for this book at https://github.com/PacktPublishing/Swift-Cookbook-Second-Edition/tree/master/Chapter07/01_Using_Swift_Playgrounds_for_UI
We will be using a semi-transparent texture image for this recipe. You can supply your own, or download a sample one from here: https://github.com/PacktPublishing/Swift-Cookbook-Second-Edition/tree/master/Chapter07/02_Import_Resources_into_Playgrounds/EmbeddedResource.playground/Resources
...