Others have written a lot about the Swift class inheritance, here I just to add a little rookie tutorial inheritance on no materializing description of things, rookie tutorial about class-inherited sites: http://www.runoob.com/swift/swift-inheritance.html
On this issue, another blog post also wrote this:
http://blog.csdn.net/binglan520/article/details/52662815
All of the attributes in the parent class can be defined without giving the initial value, the value is given in the Init function, and the properties of the subclass must be given the initial value at the time of definition, or the INIT function will give an error.
The example code is as follows:
Class father{ var valuefather:int//There is no assignment init{ valuefather = 0; }}
Class child{ var valuechild:int //There is no assignment, compile will error init{ super.init (); Valuechild = 1; } }
The right subclass should be
Class child{ var valuechild:int = 0//There is no assignment, compile will error init{ super.init (); Valuechild = 1; } }
The type of error is: Property ' Self.valuechild ' isn't initialized at Super.init call
A little bit of a problem with Swift class inheritance