freeCodeCamp/guide/chinese/swift/hello-world/index.md

26 lines
518 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Hello World Swift
localeTitle: Hello World Swift
---
你好,世界
只有我们必须将方法`print("Hello World")` 从库UIKit添加到类ViewController的函数`viewDidLoad()`中:
\`\`\`斯威夫特 导入UIKit
class ViewControllerUIViewController {
```
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
print("Hello World")
}
```
} \`\`\`
##输出: \`\`\`
> 你好,世界 \`\`\`