1. Open Xcode and select Create a new Xcode project
2. Open the template window and select Single View Application
3. Enter the project name, here we use "Helloworld" as an example, and then select Swift in Language
4. Save the project to a local path and choose a directory by yourself.
5. This interface is automatically opened after saving, which contains some settings of the project project, just use the default ones.
6. Click "Main.storyboard" in the directory structure on the left to open the following main interface. This is the default interface when your program is opened.
7. Now add a Button and a Label to the interface, the controls are in the Panel in the lower right corner, and set the Button text to "OK"
8. Next, we need to add a key event to the Button. After pressing the Button, "Hello World!" will be displayed on the Label.
Right-click on the Button control, and click the circle to the right of "Touch Down" under "Sent Events". Pull it to the code area on the right, Xcode will pop up the input box below, enter "o'clock" in "Name", and then connect to create an event
9. Modify the screen size
10. Finally start the test