??
Swift 2.0 Learning notes-my first line Swift Code
when I first saw the following code, I petrified, what is the code? The words spelled out?
Import Foundation
var str = "HelloWorld"
print (str)
dizzy, okay, keep your head down and look down, oh, yes.
The first sentence: Import Foundation
represents the introduction Foundation Framework.
What is the Foundation framework?
Foundationis aOS Xand theIOSthe underlying framework for application development, which includes basic classes such as numbers, strings, arrays, dictionaries, and so on.
CocoaFramework isOS Xthe development requires several frameworks which include:AppKitand theFoundationFramework. UIKitFramework isIOSgraphical user interface development requires a framework that includes common views and view controllers.
The second sentence: var str = "Hello World"
declaration str variable, var denotes declaring a variable.
The third sentence: Print (str)
Print (_:) is a function that can output variables or constants to the console.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Swift 2.0 Learning Notes-My first line of Swift code