Creating a class inside the app

Add a file (.swift).
Type:

class ClassName
{

  var property1: String

 init(prop1: String)
 {
  self.property1 = prop1
}
}

When referring to properties, use self.propertyName

Comments

Popular posts from this blog

Setting up a playground

Go to another page