Experiment
Add an Experiment
callout to a playground or to the Quick Help for a symbol using the Experiment delimiter. Multiple Experiment
callouts appear in the description section in the same order as they do in the markup.
Provide a link to another playground page for complex experiments using the Named Page delimiter.
Works with:
✓ Playgrounds
✓ Symbol documentation
Syntax
* | + | - Experiment: description
optional continuation of description
The description displayed in Quick Help for the experiment callout is created as described in Parameters Section.
Playground Example
The example below shows a simple step by step experiment.
/*:
* Experiment:
Find out if you are tasting your food or smelling it.
1. Get a few different foods you like.
2. Cut them up so they are all about the same size.
3. Put them in a dish and mix them up.
4. Close your eyes (no peeking!)
5. Hold you nose and eat several pieces of food.
Could you tell which food was which?
*/
Quick Help Example
The markup below adds three experiments to Quick Help as shown in the screenshot.
/**
An example of using the experiment field
- Experiment: Pass in a string in the present tense
- Experiment: Pass in a string with no vowels
- Experiment:
Change the third case statement to work only with consonants
*/
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2017-06-05