I'm a software developer based in the UK. I am blogging regularly about software development & Apple

Playgrounds cheat sheet

A single line markup statement starts with '//:'
A multi line markup statement is enclosed between a starting '/*:' and an ending '*/'
The playground rich markup docs can be found here.

Headers

//:# Header
//:## Header2
//:### Header3

Header
Header2
Header3

Lists

/*: Bullet points
+ list item 1
+ list item 2
+ list item 3
*/
Bullet points
  •  list item 1
  •  list item 2
  •  list item 3
/*: Numbered lists:
1. list item
1. list item
1. list item
*/
Numbered lists:
  1. list item
  2. list item
  3. list item

Font attributes

/*:
- *Italic fonts* with a single _leading_ and _trailing_ * or _
- **Bold fonts** with a **double leading and trailing** ** or __
*/
 •    Italic fonts with a single leading and trailing * or _
 •    Bold fonts with a double leading and trailing ** or __

Code blocks

/*:
 ````
 let indices1 = Array(0..<10)
 let indices2 = Array(0..<5)
 
 for i in indices1 {
 for j in indices2 {
 print (i*j)
 }
 }
 ````
*/

Example
let indices1 = Array(0..<10)
let indices2 = Array(0..<5)

 for i in indices1 {
    for j in indices2 {
       print (i*j)
    }
}

Links

/*:
There are just a few link types:
 
 - [external playground link with a link description](http://www.allaboutswift.com)
 - [internal playground link pointing to a page named "page"](page) **or**
 - internal playground link pointing to the **[previous page](@previous)** or **[next page](@next)**
 */

There are just a few link types:

     •     external playground link with a link description
     •     internal playground link pointing to a page named "page" or
     •     internal playground link pointing to the previous page or next page

Callouts

/*:
 - callout(Custom callout): FYI only
 - experiment: Let's see ...
 - note:What's that?
 - important: Don't forget this !
 - example: Something like this
*/

Custom Callout
FYI only

Experiment
Let's see ..

Note
What's that?

Important
Don't forget this !

Example
Something like this

Stackviews in iOS9

View layout in iOS 9 with Swift