I've done a little bit of swift in before and can answer a handful of the questions.
Reusable functions
Swift allows methods to be static meaning you can call them without having to call a new instance of the class, similar to Java. I tend to make a class dedicated to them if needed for example:
classHelper{staticfuncpostRequest()->[String:String]{return["something here":"something also here"]}}
Can then be called like so
Helper.postRequest()
Additionally i found it's possible to use structs as well as extensions
It kind of acts like a template of basic code needed to run the project out of the box. From this example it shows that its using the UIKit framework, and by seeing this we can see that the class needs to have some form of connection to the user interface
The @UIApplicationMain attribute indicates that the application delegate is using this function and passing the class's name as the name of the delegate class.
Ways
I think that with swift there is multiple right ways, with the little experience I found that multiple methods and ways of doing something can always work as intended.
I believe majority of this info is correct, my swift knowledge is pretty low. But hope it can help in some way :p
I've done a little bit of swift in before and can answer a handful of the questions.
Reusable functions
Swift allows methods to be static meaning you can call them without having to call a new instance of the class, similar to Java. I tend to make a class dedicated to them if needed for example:
Can then be called like so
Additionally i found it's possible to use structs as well as extensions
Extension example
AppDelegate
It kind of acts like a template of basic code needed to run the project out of the box. From this example it shows that its using the UIKit framework, and by seeing this we can see that the class needs to have some form of connection to the user interface
The @UIApplicationMain attribute indicates that the application delegate is using this function and passing the class's name as the name of the delegate class.
Ways
I think that with swift there is multiple right ways, with the little experience I found that multiple methods and ways of doing something can always work as intended.
I believe majority of this info is correct, my swift knowledge is pretty low. But hope it can help in some way :p
Great!
Superb man