I want to take user input from command line. I'm using readLine()
but I'm unable give any input.
Asked
Active
Viewed 2,659 times
3
-
2See http://stackoverflow.com/questions/36937436/exc-i386-gpflt-in-swift-code-using-xcode-playground. There's no way to use command line user input in a Playground. It only works in a real command line application. – Eric Aya Dec 07 '16 at 10:52
3 Answers
1
In playground it is not possible to take an input from user. Playground is just a launcher of your swift code.
sorry!

Muhammadjon
- 190
- 2
- 11
1
Create a playground with a Single View and add a UITextView and an enter button.

uplearned.com
- 3,393
- 5
- 44
- 59