Presentation is loading. Please wait.

Presentation is loading. Please wait.

Swift by Kevin Gamboa Teky Alvarado Hieu Tran Elizabeth Sanchez

Similar presentations


Presentation on theme: "Swift by Kevin Gamboa Teky Alvarado Hieu Tran Elizabeth Sanchez"— Presentation transcript:

1 Swift by Kevin Gamboa Teky Alvarado Hieu Tran Elizabeth Sanchez
Christopher Fong

2 Agenda What is Swift Swift History/Purpose Facts about Swift
Swift usage (syntax) Benefits of Swift Swift’s key features X-Code--Playground Demonstrate a Demo using Swift. Kevin - Intro / purpose Teky - Swift Facts, Syntax Hieu - it is perfect for beginners,Benefits, Pros, and comparing it to Objective C? Elizabeth - Features, and X code / Playground Chris - Demo

3 What is Swift Ability to use for many types of programs
It is a general purpose programing Language. Mac and Ios Development Ability to use for many types of programs Provides modern programming features. General Purpose Prog. Language - capable of creating all types of programs Swift is an alternative to the Objective-C language that uses modern programming-language concepts and strives to present a simpler syntax Used for Mac and iOS development Swift is a powerful and intuitive programming language for macOS, iOS, watchOS and tvOS. So if you would like to create programs for macs, iphones, apple watches, or apple tv’s then swift is the language for you to use. Swift is able to be used for many types of programs Such as simple social media apps, up to high end 3d types of games using apple’s Metal Framework. Some modern programming features: interactivity which other languages do not provide

4 History Swift was created by Apple Chris Lattner - 2010
Introduced in 2014 (WWDC) Swift Language was created by Apple, but the Development on the swift language began in july 2010 by chris lattner, then eventually collaborated with other developers at apple. 4 years later, it was introduced at the WWDC, which is Apples WorldWide Developers Conference This makes swift a quite young language, so many optimizations have not yet been done.

5 Purpose Easier for developers. Great learning tool
Students are able to learn easier Objective-C compatible Open Source Open source - Most software that you buy or download only comes in the compiled ready-to-run version. Compiled means that the actual program code that the developer created, known as the source code, has run through a special program called a compiler that translates the source code into a form that the computer can understand

6 Swift facts Inspired by Objective C, python, C # etc
Interactive programing language Runswiftlang.com Great beginners Language “The Swift Programing Language” Inspired but many more, too long to put down (ruby, Rust….etc) Using Playgrounds You can actually run your code as you type it and see your results instantly. (Explained in more detail later) this is also good for understanding your code and teaching others how the code works a free 500-page manual, was also released at WWDC, and is available on the iBooks Store and the official website. It acts as a reference, tutorial and has many screenshots which is great for learning purposes. If you wanna compile and run swift code without a mac,runswiftlang allows you to do so Great Intro programming language for students to start with, not as intimidating as Java. Easier to understand.

7 Syntax Data Types Creating Variable Arrays Semicolons ;
Int, [ ], Bool Creating Variable Var, Let Var animal = “5” Arrays Var,Let Semicolons ; Naming variables can be fun! Emojis 😝😛😍 Swift supports common data types like Int for creating integers, square brackets for arrays, and Bool for boolean values Swift provides two keywords for creating variable, Var & Let. Var creates mutable variable which means their values can be changed at any time, Let create immutable variables, there values cannont be altered. Something cool about using var is that you do not have to provide the variable type because it will be inferred if you do not add it. The compiler will understand you mean integer which also saves you a lot of time 3. Arrays pretty much work like creating variables, with var being mutable arrays, and let immutable 4. Statements do not need to end with a semicolon, if you dont use it your code will still run. We all know that we have looked for that one semicolon for hours when our code hasnt ran! 5. Lastly naming variables can be fun ! With swift you

8 Cons

9

10

11

12 Swift Features User-friendly, based off C programming language
Multi-paradigm (C#) Simplicity and expression is key! Changing values is quick and easy print("Hello, world!") You don’t need to import a separate library for functionality like input/output or string handling Constant and variable names can contain almost any character, including Unicode characters: let π = let 你好 = "你好世界" let 🐶🐮 = "dogcow" UserFriendly-- Swift has allowed for users to, for example, miss out on writing semicolons in their code and still run, no main function is needed. Changing values-- If you want to change one variable, for example: var EXAMPLE, a user will be able to change all instances where the variable is being used rather than the user having to change every instance of the variable and having to search through the entire code. Expression--Swift allows for many different characters to be implemented in their code which is inspired by making the language enjoyable to the user.

13 Xcode / Playground Xcode--Framework Swift is compiled on.
Allows great control from the user Playground--runs off swift programming Made for iPad-- allowing code to be shared among devices Runs results immediately to allow students to view their creations instantaneously Xcode--Makes your code compatible for all apple devices, by fixing ratios. Xcode--Finds hidden bugs and alerts the user for safety, before an app is created Xcode will alert what won’t work. Playground--requires no coding knowledge as it gives you step by step instruction Playground can run code as a user is writing it. This allows for mistakes to be found much qiucker.


Download ppt "Swift by Kevin Gamboa Teky Alvarado Hieu Tran Elizabeth Sanchez"

Similar presentations


Ads by Google