I know that static
keyword is used to declare type variable/method in struct
, enum
etc.
But today I found it can also be used in class
entity.
class foo {
static func hi() {
println("hi")
}
class func hello() {
println("hello")
}
}
What's static
keyword's use in class
entity?
Thanks!
edit: I'm referring to Swift 1.2 if that makes any difference
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…