small medium large xlarge

05 Aug 2015, 14:36
Brian P. Hogan (178 posts)

Hi everyone. I’m excited to hear about how you’re using this book and how it’s working out for you. If you have questions or comments, post them here!

25 May 2016, 17:45
Khalid Naseem (3 posts)

Hi, Is it possible to prompt a user to input name in swift programming in playground?

25 May 2016, 18:37
Brian P. Hogan (178 posts)

Unfortunately, Swift Playgrounds do not support user input from what I can tell.

You’ll need to instead create a new command line application and use Swift to prompt for input that way.

Most of the exercises in this book require user input.

A quick Google search should show you how to prompt for input in Swift. I found a few ways when I just looked, although I am not at all an expert with Swift.

When I made this program, I actually built the UI with a text field and a button, and wired things up that way. I learned a lot about how to build graphical iOS apps that way.

You must be logged in to comment