preface

There are a lot of software engineers working on iOS, not only because iOS is favored by many Apple fans for its superior user experience, but also because Apple provides a complete closed-loop ecosystem for iOS developers to benefit from. From the attention of WWDC and the number of new apps launched every year, it can be seen that iOS development has been the focus of developers’ attention. In WWDC 2014, Apple released a new programming language Swift to replace Objective-C (OC). After five years of development, the ABI is finally stable with the release of Swift 5.0. In WWDC 2019, Apple released SwiftUI, the Swift Only API. More and more development frameworks and apps are rewritten in Swift language, which shows Apple’s emphasis and determination on Swift. The future of iOS development languages must be Swift.

Writing purpose

  • Reason 1: Although Apple launched “The Swift Programming Language” and there are many translated versions in China, The cases in it are relatively complex and The translation is sometimes too obscure, which is not particularly friendly to beginners or zero-based learners.
  • Reason two: the editions of books published in the market lag behind the official edition.
  • Reason 3: Many tutorials only translate the most basic grammar of official Swift, and many knowledge points are not clearly classified, the context is not clear, and the focus is not prominent.

Suitable for the reader

  1. IOS /macOS starter developer
  2. Developers who have learned old versions of Swift and want to learn the latest version of iOS/macOS
  3. IOS /macOS developers from other development languages

The main content

  1. The introduction
  2. playground
  3. annotation
  4. Constants and variables
  5. Basic data types and operators
  6. tuples
  7. Logic branch
  8. cycle
  9. character
  10. string
  11. An array of
  12. A collection of
  13. The dictionary
  14. Selection can be
  15. function
  16. closure
  17. Higher-order functions
  18. Practical knowledge point
  19. The enumeration
  20. The structure of the body
  21. class
  22. Properties and Methods
  23. Construction and destructor
  24. Structures and classes
  25. Type conversion
  26. agreement
  27. extension
  28. Associated Object
  29. The generic
  30. abnormal
  31. Result
  32. Never
  33. Metatype, dot self and self
  34. @objc
  35. where
  36. Key Path
  37. @dynamicMemberLookup
  38. @dynamicCallable
  39. Access permissions
  40. Codable agreement
  41. Visual development of Playground
  42. Mixed development
  43. The namespace
  44. Common data types
  45. conclusion
  46. New features in Swift 5.1
  47. Swift best practice recommendations

E-books andVideo tutorialTie-in, ebook long-term update