Swift is now open source. For the latest news, visit the Swift open source blog

Interactive Playgrounds

Xcode 7.3 beta 3 adds interactive iOS and OS X playgrounds that allow you to click, drag, type, and otherwise interact with the user interfaces you code into your playground. These interfaces react just as they would within a full application. Interactive playgrounds help you to quickly prototype and build your applications, and simply provide another great way to interact with your code.

Any view or view controller that is assigned to the liveView property of the XCPlaygroundPage is automatically made interactive, and since it runs within a playground you get all the usual playground results. You can experiment with gesture recognizers, see how UITableView creates and dequeues cells as you scroll, or interact with a complex 3D scene in SceneKit.

Sample playground

Below is an iOS playground that uses UIKit Dynamics to create a fully-interactive and customizable Newton’s Cradle, perfect for your desktop.

Newton’s Cradle

All Blog Posts