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

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
主站蜘蛛池模板: 通化市| 宁都县| 峨山| 耒阳市| 清新县| 霍城县| 商洛市| 镇康县| 高密市| 济南市| 吕梁市| 东丽区| 饶平县| 秦安县| 鸡东县| 敦煌市| 常山县| 威远县| 闽清县| 巫山县| 泾阳县| 行唐县| 新泰市| 大方县| 黄大仙区| 八宿县| 富源县| 思茅市| 鸡西市| 塔城市| 馆陶县| 泸西县| 文登市| 新巴尔虎左旗| 莱阳市| 南皮县| 兴海县| 苍溪县| 驻马店市| 仁化县| 勃利县|