Animated Sorting Algorithms - Rich Playgrounds

One of the awesome new features introduced in Xcode 7 was the ability to add pages into a Swift Playground.

It doesn't seem like much but it's actually a huge addition. It now means that you can combine the rich comment syntax and pages to create amazing learning resources with interactive code and animated views.


So, I thought I'd start on a learning project of my own and create a learning resource for other people at the same time.

It's still a work in progress as I only started a couple days ago but I'm really pleased with how it's going so I wanted to share.

I've always wanted to create animated representations of sorting algorithms and so I thought I'd use this as an opportunity to do that also.

You can get the playground on my GitHub repo

You'll need Xcode 7 installed to be able to run it.

Let me know what you think. If you'd like to add something then fork it and create a pull request.

One Comment

  1. John M Raggio

    Hi Oliver,
    I realize this is an old post, but I wanted to thank you for sharing it. I set out to do something similar to refresh my memory on sorting and using Swift Playgrounds. I noticed something in your output that I also see in mine. The NSView seems to have a grayed out tint to it while the program is running and then shows in full color when it is done. Do you know why? Can it be avoided?


Leave a Reply

Your email address will not be published. Required fields are marked *