官术网_书友最值得收藏!

Working with Objective-C in a Mixed Code Base

Swift builds upon the strong heritage of Objective-C. When Apple released the first version of Swift, they also reassured all developers that their Objective-C code bases would be able to integrate Swift progressively thanks to a strong interoperability layer. Even today, many applications haven't fully migrated to Swift, and interoperability is key to ensure that the Objective-C code isn't bringing instability and unsafe types into your shiny Swift modules.

In this chapter, we'll have a look at techniques to write safer Objective-C code:

  • How to import Swift code in Objective-C and vice versa
  • How to add nullability to Objective-C
  • How to expose renamed methods to Swift
  • How to leverage lightweight generics in Objective-C
  • How the Cocoa design patterns translate in Swift
主站蜘蛛池模板: 石柱| 米易县| 叶城县| 崇仁县| 梓潼县| 石屏县| 吴堡县| 黑水县| 纳雍县| 朝阳县| 手游| 共和县| 丘北县| 东宁县| 塘沽区| 大竹县| 江阴市| 湟源县| 沾化县| 达日县| 锡林浩特市| 天水市| 锡林浩特市| 贺州市| 余江县| 攀枝花市| 阳泉市| 萝北县| 武义县| 永城市| 两当县| 徐水县| 永安市| 玉山县| 瑞昌市| 即墨市| 富锦市| 文水县| 屯门区| 兖州市| 宁阳县|