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

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
主站蜘蛛池模板: 黔东| 通河县| 龙里县| 望谟县| 泉州市| 永康市| 黔西县| 汉川市| 博客| 宁都县| 平利县| 天津市| 江门市| 石阡县| 龙川县| 扎赉特旗| 平武县| 苏尼特右旗| 墨玉县| 沙湾县| 镇康县| 定安县| 武邑县| 尼玛县| 惠来县| 宁武县| 九龙坡区| 文成县| 巴南区| 五寨县| 德格县| 普安县| 新安县| 女性| 左云县| 泰安市| 澄城县| 绩溪县| 太康县| 陆丰市| 诸城市|