Swift input | Sololearn: Learn to code for FREE!

+8

Swift input

In swift, how do I require input in one of my codes?

5/6/2018 9:36:00 PM

Wolverine88

4 Answers

New Answer

+5

I had the same problem before and the answer is YOU CANNOT. I guess this is because Swift is made for iOS app development therefore your inputs would be buttons, textfields .....

0

readLine()

0

Check the Swift tutorial here.

0

According to Apple Documentation, The Official way of taking input from using in REPL is “if let userInput = readLine() { // Do Stuff with the Variable }