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

Summary

In this chapter, we have explored the Swift Standard Library, Dispatch, and a piece of Foundation with URLSession. You should now be comfortable with basic types, containers (such as dictionaries and arrays), modern enumeration, mapping, and reducing techniques. With Dispatch, you now have a good understanding of the differences between threads and queues, how serial and concurrent queues can be used to effectively make your programs more performant (but also unsafe), and ultimately, how to use synchronization techniques to organize the execution of your programs in a safe manner. Finally, we scratched the surface of the Codable protocols and applied them to URLSession in a generic way. This will allow you to write a type-safe client with excellent error handling and resilience against malformed responses.

Not all projects are written solely in Swift; many still share implementations with Objective-C. Now that you have a good grasp of the Standard Library, in the next chapter, we will look at all of the kinks and quirks involved with working in a mixed-code base.

主站蜘蛛池模板: 扎赉特旗| 马边| 陇南市| 隆回县| 车险| 尉犁县| 北宁市| 海原县| 温泉县| 澄城县| 白沙| 宁海县| 惠安县| 吉安县| 建阳市| 海兴县| 海淀区| 民勤县| 株洲市| 海盐县| 丘北县| 陆良县| 大竹县| 英吉沙县| 黄梅县| 伊金霍洛旗| 城固县| 依安县| 吴桥县| 稻城县| 泸定县| 金寨县| 阿城市| 高清| 互助| 竹山县| 桓仁| 拉萨市| 友谊县| 赤壁市| 綦江县|