While building apps, we will often need to bundle resources, such as images, with the app. 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.
Import Resources into Playgrounds
Getting ready
For this recipe, we will use the playground from the previous recipe. The playground is called Simple_iOS.playground, and you can get it from the GitHub repository for this chapter, available at http://swiftbook.link/code/chapter6.
This playground demonstrates a simple custom view that shows a bar chart. We will improve this playground by adding a semitransparent image that will act as a texture for the bars in our bar chart.
You can download the semitransparent...