I'm learning about protocol
s now, and I saw a code snippet in Swift 4 that defines a protocol, below the snippet of code.
protocol AnotherProtocol {
static var someTypeProperty: Int { get set }
}
Note that the variable someTypeProperty
is declared as static
, and in this case below it appears without static
.
protocol AnotherProcol {
var someTypeProperty: Int { get set }
}
What's the difference between these two types of protocol implementation in Swift 4 language?