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

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
主站蜘蛛池模板: 和田市| 松阳县| 浠水县| 南丹县| 东海县| 资阳市| 台安县| 织金县| 耿马| 福清市| 长顺县| 永宁县| 襄城县| 互助| 忻州市| 海安县| 忻州市| 呼图壁县| 金湖县| 兖州市| 綦江县| 邛崃市| 石渠县| 衡阳县| 麻城市| 宁陵县| 嘉荫县| 洛扎县| 竹溪县| 桦甸市| 黔东| 凉山| 始兴县| 灵寿县| 忻城县| 大港区| 德保县| 库伦旗| 泰安市| 崇左市| 云林县|