To call a public property on an instance of a class in Swift, you can use dot notation.
Assuming you have a class Person
with a public property name
, you could create an instance of the Person
class and call the name
property like this:
main.swift277 chars15 lines
gistlibby LogSnag