Multi-Page Playgrounds
We've often discussed how playgrounds can be a great tool for exploring APIs and experimenting with UI; however, playgrounds can also be used for documenting APIs, and providing rich and linkable content. Swift playgrounds provide support for rich text formatting in comments and multiple pages of content, and we will explore these features in this recipe.
Getting ready
In this recipe, we will start with the playground we used in the last recipe, which displayed our custom BarChart
view. You can get the playground, called EmbeddedSources.playground
, from the GitHub repository for this chapter, at http://swiftbook.link/code/chapter6.
We will use our BarChart
view to display the price in US Dollars of three different cryptocurrencies over a 6-month period between January 2017 and June 2017. We can show each type of currency on a different playground page.
Note
If you want to know more about cryptocurrencies, check out the video at http://swiftbook.link/videos/cryptocurrencies...