+ 8
Swift input
In swift, how do I require input in one of my codes?
5 ответов
+ 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
}
0
yes but it doesn't seem to work with boolean values