It’s one of those things that when you know how it seems completely obvious but when you don’t, it feels impossible.
To zoom in or out in Apple’s Swift Playground, you need to place your mouse in a special position. It needs to be in the middle just above the floating island. Once the mouse pointer is in this position, you can then pinch zoom in or out very easily.
Check out the “how to zoom in Swift Playground” video below.