Home  >  Article  >  Java  >  Recommended source code courseware for Wanerzhuan Swift video tutorial

Recommended source code courseware for Wanerzhuan Swift video tutorial

黄舟
黄舟Original
2017-12-04 11:26:141230browse

We hope that after watching this "Playing Swift Video Tutorial", users will have an upper-intermediate understanding of the Swift language. This means that getting in touch with Cocoa Touch will be effortless at all, and you can understand and practice some advanced concepts such as closures, protocols, generics, and memory management. This set of tutorials must be more in-depth than the Swift Chinese tutorials commonly seen on the market, and have more demonstration examples.

Recommended source code courseware for Wanerzhuan Swift video tutorial

Course playback address: http://www.php.cn/course/460.html

The teacher’s teaching style:

The teacher’s lectures are vivid, witty, witty, and touching. A vivid metaphor is like the finishing touch, opening the door to wisdom for students; an appropriate humor brings a knowing smile to students, like drinking a glass of mellow wine, giving people aftertaste and nostalgia; a philosopher's aphorisms, cultural references Proverbs are interspersed from time to time in the narration, giving people thinking and warning.

The more difficult part in this video is the control flow and logical architecture:

1. The control flow in swift statements is roughly the same as that in other languages. If and switch are used as Condition control. Use for-in, for, while, do-while as loops.

2. The difference: the parentheses are not necessary, but the curly braces of the body are still necessary,,,,

3. In the if statement, the condition must be a Boolean expression, This means that if score{...} is wrong and cannot be implicitly compared with 0

4. You can use if and let together to prevent the loss of values. These values ​​are optional. The optional value contains a value or contains a nil to specify whether the value still exists. Write a question mark "?" after the type to indicate that the value is optional.

5. In the switch-case statement, switch can receive any type of variable or statement as a condition, and is no longer limited to character types, integers, etc. After a statement ends, there is no need to write break , but the final defalut cannot be omitted. Each case of switch must have at least one statement and is not allowed to be followed by an empty statement.

6. You can maintain an index in the loop and use ".." to indicate the index range or specify an initial value, condition, or increment. Use "..

7. There is a new type tuple in the control flow, which can store many values ​​​​at the same time. , the value can be obtained through "tuple name.index", or it can be obtained by traversing. Of course, it can also be obtained through keys or functions.

Here is also recommended for everyone to download the information: http://www.php.cn/xiazai/learn/2075

1. Play with Swift video Tutorial (source code)

The above is the detailed content of Recommended source code courseware for Wanerzhuan Swift video tutorial. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn