Every iOS app needs a user interface, but that user interface won’t do anything until you write Swift code to make it work. While you could write all your code in a single file, it’s better to divide your code into files where each file contains related code. A simple app might only contain a handful of files, but a more complicated app could contain dozens or even hundreds of separate files that contain related Swift code. Within each file, you can further organize your Swift code into separate functions.
Retrieve data from the user interface
Calculate ...