popads

BAR

Saturday 12 May 2018

swift for beginners(the basics)

Welcome to Swift!

introduction to swift:

Image result for swift logo

Swift combines the best of C and Objective-C.

It's ideal for creating new apps and works seamlessly with Objective-C, so it's compatible with apps previously created in that language. 
Swift is ready for your next iOS and OSX project - or for addition into your current app - because Swift code works side-by-side with Objective-C.
We will be covering Swift version 2 in this course
."Hello World"
Printing text is easy:print("Hello, world!")
To print the value of a variable inside a text, place it in parentheses, and insert a backslash just prior to the opening parenthesis:print("The value is \(myVariable)")You do not need the backslash for printing only the variable value:print(myVariable)
Use of the semi-colon (;) following each statement is fully optional in Swift, unless you wish to place several independent statements on a single line, in which case the semi-colon is required.



No comments:

Post a Comment