+ 1
Please what key or method is used to collect user input in swift programming language
8 Antworten
+ 3
You can use the readLine() method to get the user input. The method returns an optional string so you'll need to unwrap it.
Ex;
let s = readLine()!
+ 3
Can you share your code?
0
Thanks but, do you change the letter after "let" bcs i tried using
let name = readLine
and it said i can't redeclare 'name'
0
I actually went back to the lesson and got some help, but now it tells me type annotation missing
0
Wow, thanks a bunch, really appreciate
0
Also do you know how i can add graphics to my swift code