Thursday, November 13, 2014

Programming with Swift for iOS !


What is swift?
  • A new programming language for iOS and OSX app development.
  • Adopts modern programming patterns and features to make programming easier and flexible.
  • Provides seamless access to existing Cocoa frameworks and mix-and-match interoperability with Objective-C code.
  • First industrial-quality systems programming language that is as expressive and enjoyable as a scripting language.

New in swift
  • Support for functional programming patterns like maps and filters.
  • Structs support protocols, methods and extensions.
  • Support for Generics and optionals.
  • Support for tuples and hence functions that can return multiple values.
Why use swift?
  • About 2.8X faster than objective C.
  • A compiled programming language with syntax similar to scripting languages.
  • Improved readability over other languages by removing extraneous parenthesis and semi colons.
  • Enums and control flows have been vastly improved.

Tools Needed
  • Needs Apple LLVM 6.0 for compilation, which is shipped with Xcode 6.0.
  • Uses the same runtime as existing Objective-C system on Mac OS and iOS.
  • Backward compatible up-to iOS 7.0.
Introduction to “Playground”
  • A new type of file that allows you to test out Swift code, and see the results of each line in the sidebar.
  • Results appear on the sidebar as soon as any code is typed.
  • Great way to learn about Swift, to experiment with new APIs, to prototype code or algorithms.
Objective C Vs Swift
  • Closures: Closures are self-contained blocks of functionality that can be passed around and used in your code. Closures in Swift are similar to blocks in C and Objective-C.
  • AnyObject: The equivalent of ‘id’ from Objective C, is ‘AnyObject’ in swift.
  • Introspection: The equivalent of doing if ([obj isKindOfClass:[NSString class]]) { ... }) in swift is if obj is String.


















13 comments:

  1. Thank you sharing this informative information.It is very helpful for people who wants to know more about iPhone app development trends.

    ReplyDelete
  2. The language swift adopts a safe programming feature to make it simpler, easier on iOS. Thanks for discussion about Swift. It's clear and easy to understand for all level of skilled users.

    Jeevitha from Way2Smile (Trusted iPhone App Development Company in Chennai)

    ReplyDelete
  3. A good blog that inspires many to learn about the Swift Framework for it can prototype codes and also integrate new API’s effortlessly. It was nice reading your blog and the next time I hope to see some images posted. Thank You for the blog.

    Best Regrads - VigneshWaran P ( iPhone App Development Companies)

    ReplyDelete
  4. As iPad and iPhone are dominating in smartphone market; it is strategically important to make your application compatible with iOS. Indian App Developer is prominent company which provides iPhone app development India with innovative, interactive and user-friendly services in sync with your business requirement. Our highly skilled team and efficiency to develop IOS Apps that helps businesses gain their visions faster and better. Our cost-effective mobile solutions help us to serve our small & mid-sized companies and brands.

    ReplyDelete
  5. Dream11 is one of the most popular and trending fantasy app in the Indian subcontinent. It has emerged to become one of the biggest names in the fantasy sports genre of mobile applications. This application is popular because it allows the participants to win some quick money. If the participants have the right knowledge and skills, they can win a significant amount of money from each game they play. Are you wondering that how to make app like Dream11? However, you must understand that it is not an easy task to start a fantasy app development project.

    ReplyDelete
  6. If you are looking for developing iOS Application Development that could clear the vision for that you need an iOS app development company to catch up to your expectations for the product.

    ReplyDelete
  7. Online food ordering is undeniably a million dollars business. Significant urban population, their busy lifestyles have driven the online food delivery market growth.
    Food Ordering App Development

    ReplyDelete
  8. Xperts Pest Control Services Pvt Ltd" are pioneers in the Eco-accommodating vermin the board arrangements, the first of its sort in the country by staying up to date with the most recent turns of events.
    https://www.xpertspestcontrol.com/

    ReplyDelete
  9. Thanks for sharing this Informative content. Well explained. Got to learn new things from your Blog
    Iqra technology

    ReplyDelete
  10. through this article I really learned a lot of new things that are very useful, thank you for providing this information Slot Gacor

    ReplyDelete