protocol
🚧 施工中
Last updated
Was this helpful?
🚧 施工中
Last updated
Was this helpful?
Swift ⟩ type ⟩ category ⟩ protocol
A set of requirements, such as methods and properties, that can be adopted (or followed) by a type, such as a class, structure, or enumeration.
When a type adopts a protocol, it provides its own implementation of the protocol requirements, and is said to conform to that protocol.
中文稱為「規範」或「協定」。