U3F1ZWV6ZTUwNTI4OTA5MzQ0MzM2X0ZyZWUzMTg3ODAwNTI5MjgwOA==

What is Swift

What is Swift?




Gaga Swift is a new programming language from Apple recently launched for the developers of IOS and OSX systems that was announced at the Apple Developers Conference WWDDC in 2014 and came as an alternative to Objective-C, apple's former language. 
 Swift's language development was initiated in 2010 by Chris Lattner and relied on sources of several languages such as Objective-C, Ruby, Python, and C#. The first version was released on June 2, 2014.

Swift enables developers to program faster and with minimal errors. The language works perfectly in line with the Cocao and Cocao Touch environments, where they are mainly built on all iOS applications and Mac software. Through this new language, the company aspires to replace Objective-C, which is currently the official programming language for the development of applications for Apple products.



Start with swift

1- We download and install the Xcode environment (you need to register on the developers site to download the xcode environment).
2- After the xcode, we drag the xcode to the Appliction folder.
3- After the installation is complete, you can run the xcode environment from the Appliction folder.




Create the first Swift project


 We open the xcode environment showing the welcome screen and containing three options:


1-Get Started with PlayGround.
2-Create a new Xcode Project.
3-Check out a Existing Project.




2. We choose the first Get Started with PlayGround and then show us this screen:

1. Learn how to create the first program, swift

We enter the playGround file name in the name box.
We choose the platform we want to work on and here we choose IOS.
Then we click next to show this screen:

This screen has two parts:
1. Code editor which is the left part of this screen.
2. The scoreboard shows the output of the code which is the right part of the screen.

When you automatically create a playGround file, it contains Hello PlayGround text.
We now come to a simple explanation of the code:
In the code above, a variable is defined and variables are defined by the keyword var.
Then comes the word var, the name of the variable str, and then the value of the Hello PlayGround variable.

We will explain more about the concept of variables in future lessons.
So we're done explaining the first swift lesson.
Comments
No comments
Post a Comment

Post a Comment

NameEmailMessage