a journey from objective c to swift
TRANSCRIPT
![Page 2: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/2.jpg)
Objective-C was created at the Stepstone company in the early
1980s by Brad Cox and
Tom Love
“
”
![Page 7: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/7.jpg)
An announced made by Apple for change in
programming language for iOS and OS X
“
”
![Page 9: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/9.jpg)
Quality is much better than
quantity. One home run is
much better than two doubles
“
”
![Page 11: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/11.jpg)
Shift to SWIFT – The need for something new
Why Apple chose to adopt swift as new change?
![Page 12: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/12.jpg)
Shift to SWIFT for better results………….
Advantages of swift over Objective C
![Page 13: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/13.jpg)
EASIER TO READ
Objective C
Introduced new keywords
using the @ symbol
Follow legacy conventions
Ugly duckling used
Swift
It isn’t built on C, it can unify
all the keywords and remove
the numerous @ symbols
Drops legacy conventions
Readability makes it easier
![Page 14: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/14.jpg)
Objective C Swift
EASIER TO MAINTAIN
Maintain two code files
requirement
Manually synchronize method
between files, but this isn’t
guaranteed unless the team has
rules and code reviews in place.
Drops the two-file
requirement
Programmers do less
bookkeeping and can spend
more time creating app
logic
![Page 15: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/15.jpg)
Objective C Swift
SAFER
Pointers interesting aspect –
particularly nil (null) pointers
Swift code generate a
compiler error
-Write bad code creating a short feedback loop
-Allowing the person to fix
the problem
![Page 16: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/16.jpg)
Objective C Swift
MEMORY MANAGEMENT
ARC is supported within the
Cocoa APIs and object-
oriented code, It is not
available, for procedural
C code and APIs like Core
Graphics
Low Performance in different
case
Support for Automatic
Reference Counting is
complete across the procedural
and object-oriented code paths
Automatic and high-
performance memory
management
![Page 17: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/17.jpg)
Objective C Swift
ERASE TO CODE
Requires many steps to
combine two pieces of
information i.e. in String
Missing in Objective-C
Reduces the amount of
code that is required for
repetitive statements and
string manipulation
Adopts modern programming
language features like adding
two strings together with a “+”
operator
![Page 18: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/18.jpg)
Objective C Swift
Memorize special string tokens
(%s, %d, %@)
Objective C is established
Supports string interpolation,
which eliminates the need to
memorize tokens
SWIFT language that is
available today isn’t the
finished product
CONT….
![Page 20: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/20.jpg)
- There is interoperability between Swift and Objective C and both can be mixed and matched in the same app
- You can have typed collections on account of the introduction of Generics
- Dynamic evaluation in the development environment, in real time
- Default Parameter Values
- Difference between struct and class
- Type Inference
![Page 21: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/21.jpg)
ABOUT Us
We are ChromeInfo Technologies, a Mobile App
Development, Web Development and Software
Testing company with development center in India.
![Page 22: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/22.jpg)
REACH US @
For More…..
MOBILE : US : + 1.408.786.5369
INDIA : +91.783.800.9900
+91.981.188.2994
EMAIL : [email protected]
SKYPE : nidhi_chrome
chromeinfotech
www.chromeinfotech.com
![Page 23: A Journey From Objective C to Swift](https://reader034.vdocuments.site/reader034/viewer/2022052701/55d2e8b7bb61eb9e3c8b46b0/html5/thumbnails/23.jpg)
Follow Us