上QQ阅读APP看书,第一时间看更新
Summary
In this chapter, you learned about an object's life cycle. You also learned how object initializers and deinitializers work. We declared our first class to generate a blueprint for objects. We customized object initializers and deinitializers and tested their personalized behavior in action with live examples in Swift's Playground. We understood how they work in combination with automatic reference counting.
Now that you have learned to start creating classes and instances, we are ready to share, protect, use and hide data with the data encapsulation features included in Swift, which is the topic of the next chapter.