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

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.

主站蜘蛛池模板: 和顺县| 安远县| 舒兰市| 常山县| 苗栗县| 开平市| 时尚| 西平县| 延安市| 新巴尔虎右旗| 卢龙县| 定边县| 海安县| 禹州市| 武隆县| 柳州市| 石棉县| 恭城| 读书| 长子县| 华阴市| 当雄县| 稻城县| 竹溪县| 湖北省| 神池县| 宣化县| 泰州市| 宝坻区| 长宁县| 玉龙| 廊坊市| 丹江口市| 双桥区| 长岛县| 屯昌县| 黑河市| 乐山市| 贵溪市| 商南县| 封丘县|