In Swift, you must initialize all properties of an object either in declaration or in initialization. Otherwise, Xcode will warn you that there is property haven't initialized yet.
If you want to initialize these properties in init(), you should put the super.init() at the end of init(). You will get an error if you put super.init() before all properties have been initialized.
No comments:
Post a Comment