Playgrounds are great at showing the results of code as text in the results sidebar; however; they can also do a lot more than just work with text. We can display other items such as images and graphs. Let's look at how we would show an image in a Playground. The first thing we need to do is to load the image into the resource directory of our Playground.
The following steps show how to load an image into the resource directory:
- Let's begin by showing the project navigator sidebar. To do this, in the top menu bar, navigate to View | Navigators | Show Project Navigator or use the command + 1 keyboard shortcut. The project navigator looks similar to this:
- Once we have the Project Navigator open, we can drag ...