04

The excellent playground feature in Xcode 6 provides a great way to create interactive programming examples, but unfortunately only works with Swift.

Here’s a library submitted by Krzysztof Zablocki providing an extensive feature set for creating Playgrounds in Objective-C called KZPlayground.

Some of the features of KZPlayground as stated in the readme include:

  • Faster than Swift playgrounds (a lot)
  • Extra controls for tweaking:
    • values
    • images
  • Auto-animated values
  • Synchronizing DSL’s
  • Buttons
  • IDE agnostic, once you run it, you can modify the code even from vim.
  • Full iOS simulator and access to all iOS features, so you can prototype production ready code.
  • Nice DSL for rapid prototyping
  • CocoaPods support, so you can add it to existing projects to experiment
  • Open source, anyone can contribute to make them better!

An example project is included.

This video presentation from Krzysztof provides a great introduction to KZPlayground:

You can find KZPlayground on Github here.