How do I trigger the initWith... intention?

JetBrains newbie here. I found an intention called "Add 'initWith...' parameter". Does this generate a new method for me if I can somehow trigger it, or should I first manually write the method and then this recipe does something with my arguments?

1 comment
Comment actions Permalink

You can trigger the intention by pressing alt-enter (probably one of the most important shortcuts in AppCode) when the cursor is placed over a variable declaration. If there is already an initWith method, it will be modified (new argument), else a new method will be created. If an initWith exists and you want a second one, you can generate it (cmd-n). Everything can be undone, so it's safe to experiment.

0

Please sign in to leave a comment.