Swift 4 Programming Cookbook
上QQ阅读APP看书,第一时间看更新

Building on the Building Blocks

In this chapter, we will cover the following recipes:

  • Bundling variables into tuples
  • Ordering your data with arrays
  • Containing your data with sets
  • Storing key-value pairs with Dictionaries
  • Subscripts for custom types
  • Changing your name with typealias
  • Getting property changing notifications using property observers
  • Controlling access with access control
  • Extending functionality with extensions