Swift 2.0 Learning notes-my first line of Swift code
when I first saw the following code, I petrified, what is the code? The words spelled out?
Import Foundation
var str = "Hello World"
print (str)
Dizzy, okay, keep your head down and look down, oh, yes.
First sentence:import Foundation
Represents the introduction of the foundation frame.
What is foundation frame?
Foundation is the framework for OS X and IOS 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.
var str = "Hello World"
declaration Str variable, var denotes declaring a variable.
third sentence:print (str)
Print (_:) is a function that can output variables or constants to the console.
Swift 2.0 Learning Notes-My first line of Swift code