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

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.

主站蜘蛛池模板: 南溪县| 错那县| 湟源县| 东光县| 侯马市| 大城县| 巢湖市| 慈溪市| 黎川县| 庄河市| 北川| 宾川县| 德阳市| 钦州市| 赤壁市| 锡林郭勒盟| 东乡县| 成安县| 井研县| 手游| 茌平县| 出国| 无为县| 博白县| 玉田县| 利津县| 尼勒克县| 云梦县| 禄丰县| 正定县| 永仁县| 南木林县| 凉山| 洛南县| 永济市| 兴和县| 阿拉善左旗| 牙克石市| 永福县| 临夏县| 和田市|