Swift learns Day004 and swiftday004
5. Control Flow 5.1 loop 5.1.1 for in
5.1.2 increasing for conditions
5.1.3 while
5.1.4 do while
5.2 Condition Statement 5.2.1 if else
5.2.2 switch case
5.2.2.1 interval matching and metadata group 5.3 Control Transfer 5.3.1 continue
5.3.2 break
5.3.3 fallthrough (throughout)
5.3.4lebel6. Function 6.1 Function Definition and call
6.2 function parameters and return values 6.2.1 multiple parameters 6.2.2 no parameters and return values
6.2.3 multiple return values
6.3 function parameter name 6.3.1 common parameter 6.3.2 External Parameter Name
6.3.3 default external parameters
6.3.4 external parameters of default parameters
** The code for writing default parameters always reports an error --!
6.3.5 variable parameters
6.3.6 Input and Output Parameters
6.4 function type 6.4.1 function types in Swift
6.4.2 functions of the same type can be assigned values.
6.4.3 function type as parameter and Return Value
6.4.4 Nested functions (Nested Function) 6.5 Function nesting
Learn swift for beginners who are not familiar with it.
New languages, more convenient programming operations, as long as you have the confidence to learn well, certainly can.
If you have a certain c foundation, you can learn it faster and better.
The key to learning well lies in your own efforts.
With swift, it is also necessary to learn objectivec for ios development.
Swift was launched, and obj-c will not be discarded too quickly. Obj-c has a complete set of APIs. Currently, obj-c must be used for projects in the near future or within 1-2 years. Swift is only used to play games. Apple's official suggestion is that the main project is written in obj-c, and swift is used to develop plug-ins.