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

Methods

Methods are functions that are associated with a particular type. Instance methods are functions that are called on an instance of a particular type. Type methods are functions that are called on the type itself.

The following example presents a class containing a type method that is named someTypeMethod():

class AClass { 
class func someTypeMethod() {
// type method body
}
}
// We can call this method as follows:
AClass.someTypeMethod()
主站蜘蛛池模板: 浪卡子县| 乐山市| 滦南县| 雷州市| 襄汾县| 怀仁县| 延庆县| 易门县| 双城市| 安吉县| 邓州市| 若尔盖县| 松潘县| 方正县| 元谋县| 卫辉市| 拜泉县| 淮北市| 南澳县| 瑞丽市| 阳谷县| 中方县| 吴堡县| 慈利县| 翁源县| 江口县| 类乌齐县| 大足县| 铜陵市| 信丰县| 西乌| 安化县| 白河县| 剑川县| 慈利县| 中方县| 托克托县| 綦江县| 旺苍县| 靖边县| 丰原市|