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

Inheritance

A class can inherit methods, properties, and other characteristics from another class:

class SomeSubClass: SomeSuperClass 

Swift classes do not inherit from a universal base class. Classes that we define without specifying a superclass automatically become base classes for us to build on. To override a characteristic that would otherwise be inherited, we prefix our overriding definition with the override keyword. An overridden method, property, or subscript can call the superclass version by calling super. To prevent overrides, the final keyword can be used.

主站蜘蛛池模板: 浦城县| 葫芦岛市| 温州市| 西昌市| 永泰县| 扎鲁特旗| 香河县| 徐水县| 嘉定区| 榆林市| 姜堰市| 灵武市| 晋中市| 克拉玛依市| 丹东市| 长宁县| 海淀区| 长泰县| 波密县| 佛坪县| 麟游县| 乌恰县| 科技| 平定县| 南充市| 英吉沙县| 海原县| 通道| 延吉市| 商河县| 荆州市| 叙永县| 尼木县| 德昌县| 中牟县| 当雄县| 武宁县| 新昌县| 吴江市| 吉木萨尔县| 宁南县|