popads

BAR

Saturday 12 May 2018

swift for beginners(Introduction to Swift)



                      The Basics
Introduction to Swift




Image result for swift logo

Comments



The Swift compiler ignores comments, which are used to include non-executable text in your code
that may be used as a reminder or note-to-self.
A single-line comment opens with two forward-slashes (//):// this is a comment
A multiline comment begins with a single forward-slash, followed by an asterisk (/*). It concludes with an asterisk, then a forward-slash (*/):/* this is also a comment,
but written over multiple lines */

Multiline comments in Swift can be nested within other multiline comments.

The Tools



To build apps with Swift, you will need a Mac computer (OS X 10.10 or later), running the latest version of Xcode, which features Playgrounds, a powerful tool that allows you to run Swift code with ease.

To download and install the latest version, go to https://developer.apple.com/xcode/downloads/.
Open Xcode, and click the Get started with a playground button:
This will open the editor, which enables you to run and test your code. The code's result displays in the sidebar.
Alternatively, free Swift compilers that allow you to run code right in the browser are available online.read lesson1

No comments:

Post a Comment