I’m wondering if there is a keyboard shortcut to put every parameter of a method on a separate line.
For example from the IBAction method in chapter 2:
I start entering let alert = UIAlertController
As soon as I type ‘(’ I get a drop-down box with ‘different forms’ of the UIAlertController method:
I hit 3x the down arrow, to select the last one of the list, with 3 method parameters:
Then I hit enter, end I get this method template, with the first parameter already in blue, ready to enter the String:
I enter “Hello World” for the title parameter (on the ‘string placeholder’, so it becomes this:
Then I hit tab to move to the 2nd parameter, and start typing
Then I hit tab again to the last parameter.
The end result looks like this:
Now I want to put every parameter on a separate line, just as in the screenshot in the book, so it becomes this:
Now the only way that I can find out to do this, is to take the mouse, click before every parameter, and hit enter.
Question: I don’t want to touch my mouse while coding, so I’m wondering if there is a shortcut to do this, i.e. while completing the 3 parameters.