0

Can any one explain me , why console output is not visible in assistant editor. the bar on the right is only showing "Hello, playground" and the assistant editor is showing blank.

// Playground - noun: a place where people can play

   import UIKit

   var str = "Hello, playground"

   println("Hello")

   NSLog("Hello, world")
Kumar KL
  • 15,315
  • 9
  • 38
  • 60
Afsara
  • 1,411
  • 3
  • 13
  • 31

1 Answers1

1

You need to import the cocoa library :

import Cocoa

This Sample working fine for me:

import Cocoa

var str = "Hello, playground"
println("Hello")

NSLog("Hello, world")
Kumar KL
  • 15,315
  • 9
  • 38
  • 60
  • You might get this exception `Playground execution failed: error: :5:8: error: no such module 'UIKit' import UIKit` , If you use the `import UIKit` – Kumar KL Jun 28 '14 at 10:05
  • It's because you use Platform: OS X in Playground Settings (it's default for now, but can be changed to iOS, and then you have to import UIKit). – ovejka Jun 28 '14 at 10:31