advertisement

Swift Basics with iOS 8 features

52 %
48 %
advertisement
Information about Swift Basics with iOS 8 features
Technology

Published on October 15, 2014

Author: VivekChaudharyDev

Source: slideshare.net

Description

Swift Language basics and New iOS Features.
advertisement

1. IOS 8 Features and Swift Development Presenter: Vivek Chaudhary, Mindfire Solutions

2.  IOS 8 Features  Swift Development  Syntax and Basics  Objective C to Swift  Sample Code  Pros and Cons

3.  Battery usage indicator  Interactive Notifications  Credit Card Scanning  New keyboard  Continuity  Family Sharing

4.  Message UI and new widgets  Lock screen app suggestions  Healthkit  Improved search results

5.  Some syntax from Java Script  Smartly detects data types itself  Objective C API + Additional  No semicolon  Body Braces compulsory for If-else

6.  Single file in place of two files (.h and .m)  Declaration and implementation in the same file  Reduces the project size  Number of files reduces to half

7. 1. let someConstant : String = “constant” 2. var someVar : String = “variable”  Swift is smart enough to detect data types  Var someVar = “variable”  Var var1 = 1  Var var2 = 1.0

8.  NSString and String both are available 1. Let string = “Hello” 2. Let anotherString = string + “Mindfire” 1. For char in str 2. { 3. // Code Here 4. }

9.  Objective C  [NSString stringWithFormat:]  Swift  (expression)  Let var1 = 2  Let var2 = 3  Println( “Multiplication is : (var1 * var2)”)

10. 1. let someArray:String[] = [“A”, “B”, “C”] 2. let someArray = [“A”, “B”, “C”] 3. var someArray:String[] = [“A”, “B”, “C”] 4. SomeArray += “D” 5. SomeArray += [“D”, “E”] 6. print(“First Element :(someArray[0]) ”)

11. 1. let dict:Dictionary<String, String> = [“A”:”1”, “B”:”2”] 2. var dict:Dictionary<String, String> = [“A”:”1”, “B”:”2”] 3. var dict = [“A”:”1”, “B”:”2”] 1. dict[“C”] = “3” 2. Dict += [“D”:”4”, “E”:”5”]

12.  + and – are sliced off. func functionName(var1:String, var2:String)- >String  Functions can return more than one parameters too.  These are returned in the form of tuples.

13. Function Definition func functionName(var1:String, var2:String)- >(String, Int) Function Calling Var result : (res1:String, res2:Int) = self.functionName(var1:”Hello”, var2:”Mobile”) Print(“result is (result.res1)”;

14.  Type id changes to AnyObject  Downcast is done automatically by swift.  “as” keyword is used to typecast Var textField: UITextField = array.firstObject() as UITextField

15. One has to manually change his Objective C code to Swift  - changes to func  + changes to class func  #define changes to let  #pragma changes to // MARK :

16.  init is not used in swift.  InitWith and with is also not used.  Complex macros should be converted into functions Let myColor = UIColor(red:0.5, green:0.5,blue:0.5, alpha:1.0);

17. REFRENCE LINKS https://developer.apple.com/library/prerelease/i os/documentation/Swift/Conceptual/BuildingCo coaApps/ http://code.tutsplus.com/tutorials/an-introduction- to-swift-part-1--cms-21389

18. Thank you  Presenter: Debasish Mohanty, Mindfire Solutions

19. www.mindfiresolutions.com https://www.facebook.com/MindfireSolutions http://www.linkedin.com/company/mindfire-solutions http://twitter.com/mindfires

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

iOS 9 Swift 2, Basics to Pro, 25 Projects, 20 Apps, 7 ...

iOS 9 Swift 2, Basics to Pro, 25 Projects, ... iOS 9 Swift 2.0 - Basic ... Have already worked on Objective-C and want to learn iOS 8 Swift, Already know ...
Read more

Learn iOS Swift - Basic to Pro - Learn by making 20 Real ...

... iOS Swift - Basic to Pro course is ... Basic to Pro course is a complete iOS 8 swift ... iOS 10 - Top 10 Features ...
Read more

iOS Development with Swift - Start Learning at Treehouse ...

Learn to build iOS apps with Apple’s new programming language, Swift. Go from the basics to creating fully functional apps. ... iOS Development with Swift.
Read more

iOS 8 Programming Fundamentals with Swift: Swift, Xcode ...

Buy iOS 8 Programming Fundamentals with ... powerful Swift features such as protocols ... and useful for learning iOS 8 programming (with Swift) basics.
Read more

Learn Xcode iOS 8 SDK Programming With Swift #5- MapKit Basics

Learn Xcode iOS 8 SDK Programming With Swift #5 ... With Swift #5- MapKit Basics ... iOS 8 SDK Programming With Swift #8 ...
Read more

iOS 8 New Features | Lynda.com

Welcome to iOS 8 New Features. iOS is the operating system for iPhones, ... iOS 8 App Development with Swift 1 Essential Training Simon Allardice.
Read more

Swift - Overview - Apple Developer

Swift is an innovative new programming language for iOS and OS X with concise yet ... For these situations Swift has an innovative feature known as ...
Read more

Developing iOS Apps In Swift by Jameson Quave | Swift Book

Swift Book Developing iOS Apps In Swift ... As an added bonus, I'll also send you a sample of Chapter 2, "Basic Swift Syntax". What's your email address?
Read more

Apple - Press Info - Apple Releases iOS 8 SDK With Over ...

Apple Releases iOS 8 SDK With Over 4,000 New APIs Biggest Developer Release Ever Includes Extensibility Features, HealthKit, HomeKit & Swift
Read more