Top "Swift-playground" questions

Swift Playgrounds are interactive design environments that evaluate code as you write it.

How to use Swift playground to display NSView with some drawing?

Basically I would like to test a chart drawing in a Swift playground in NSView.

swift nsview swift-playground
Playground Import: No Such Module 'Foo'

I've diligently followed the Apple instructions to import a custom module into a playground, including the instructions here. And yet …

xcode swift xcode7 swift-playground
Swift playground - How to convert a string with comma to a string with decimal

I'm new in the Swift world. How can I converting a String with a comma to a String with a …

swift string comma swift-playground
Access properties via subscripting in Swift

I have a custom class in Swift and I'd like to use subscripting to access its properties, is this possible? …

swift swift-playground
How to read a playground text resource files with Swift 2 and Xcode 7

Xcode 7 Playgrounds now supports loading files from the nested Resources directory. I can get SKScene(fileNamed: "GameScene") when I have …

ios xcode swift-playground xcode7
Array of functions in Swift

How can I store an array of functions to callback later in an array like in JavaScript? Any and AnyObject …

swift swift-playground
How do I "open this chapter as a playground in Xcode"?

I have the Swift book open in iBooks, and see the note “For the best experience, open this chapter as …

xcode swift swift-playground
Could not find an overload for '/' that accepts the supplied arguments

// Playground - noun: a place where people can play func getAverage(numbers: Int...) -> Double{ var total = 0 var average:…

swift swift-playground
Xcode 8 playground live view doesn't work

In my Swift playground, I entered the following code to test the live view feature: let view = UIView() PlaygroundPage.current.…

ios swift xcode swift-playground
Xcode 6 Beta / Swift - Playground not updating

I was playing around with the Playground feature of Xcode 6's first beta - and I notice half the time …

swift xcode6 swift-playground