Swift Initialization
Swift has introduced new type of variables called Optional . These are used to hold nil value in swift. Because of these variable, there are some changes regarding initialization of variables. Here are details for the same: 1. It is must to have initializer in swift if using non-optional property. 2. You need to UnWrap optional variables before using them: 3. If Property can be nil then use ? after property, before setting any value: 4. If you unwrap the property while declaring, then you can use it directly. Please note that it is not considered as good practice as it may cause crash at run time. 5. With Swift new version, you need to implement initWithCoder method if using init method. 6. Before accessing self properties ( eg view), you must call super class method during init and initWithCoder . 7. You can create object before calling super method and after that can assign values to that object: 8. You can