Just created this playground in order to automatically generate the init constructor of Xcode.
Nowadays, Xcode did not generate automatically the init constructor as Android Studio does, so to save some time I have decided write some easy way to do it.
- Open the playgroung InitConstructor
- Write the name and the types of the variables at the top dictionary as the following example
var constructor:[String: String] = [
"startTime": "Int",
"endTime": "Int",
"frequencyNotification": "Int"
]- Run the playground
- Copy the printed result and paste it on Xcode
Voilà!
var startTime: Int
var frequencyNotification: Int
var endTime: Int
init (startTime: Int, frequencyNotification: Int, endTime: Int) {
self.startTime = startTime
self.frequencyNotification = frequencyNotification
self.endTime = endTime
}Only for Swift