Different from Objective-C, all variables must be initiated in the init method of a type. As there is side effect of it, the order of init method and its super class init methods should be carefully designed. In a child class, all store properties in it should be filled before calling the init method of a parent class:

class Cat {
    var name: String
    init() {
        name = "cat"
    }
}

class Tiger: Cat {
    let power: Int
    override init() {
        power = 10
        super.init()
        name = "tiger"
    }
}

The proper order of init method of child class would be:

  1. Setup the variables in the child class itself. power = 10 in the example above.
  2. Call the init method of the parent. Here issuper.init()
  3. Change all properties in parent, to the ones you need in child class. name = "tiger"

The third step is just an option. If we do not have to change things in parent class, there is no need for step 3. In this situation, Swift will call parent's init method automatically, which means the super.init() in step 2 is also not necessary to be explicitly written. So the init method could be very simple now:

class Cat {
    var name: String
    init() {
        name = "cat"
    }
}

class Tiger: Cat {
    let power: Int
    override init() {
        power = 10
        // Althogh there is no `super.init()`, thanks to Swift, it did the calling for us.
    }
}