Swift Classes/Objects
Define reference types with stored properties and methods.
Instances share identity and are passed by reference.
Define a Class
Create a class with stored properties and methods, then instantiate and call methods on the instance.
Example
clike
class Counter {
var value = 0
func inc() { value += 1 }
}
let c = Counter(); c.inc()