Storyboards provide a nice way to link the user actions with functions (code) in the app. Here is what you should do:
- Open Main.storyboard. To do it, you can use cmd + shift + O and start typing Main. Then select the file and hit return/enter.
- Select the button on the screen.
- Activate the Assistant Editor using the Assistant Editor button:
You should see the storyboard on the left, and the code of ViewControler.swift on the right:
- Right-click on the button in the storyboard. An action list should appear: