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

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.

主站蜘蛛池模板: 枞阳县| 班玛县| 万安县| 米泉市| 观塘区| 鄂尔多斯市| 赣榆县| 泗阳县| 兰州市| 廉江市| 惠安县| 名山县| 安丘市| 霞浦县| 安多县| 手机| 井研县| 财经| 海淀区| 宜黄县| 太白县| 南宫市| 读书| 阿拉善右旗| 崇信县| 肇州县| 平乐县| 平顺县| 札达县| 盐津县| 安康市| 新源县| 安岳县| 辽阳市| 额济纳旗| 平谷区| 扶绥县| 金乡县| 九江市| 闸北区| 化隆|