A metatype is a type of a type. OK post done…..jk
Metatypes are used to access properties and methods (including initializers) belonging to a type - in contrast to an instance. Every time you use a static property or function, you are using a Metatype.
|
|
They are helpful for generic code. In fact, Codable & UITableView have methods using parameters of X.Type.
To be continued…
Originally published 09/15/2022 https://pittcsc.org/, republished 09/20/2022.