Skip to content

eironeia/InitConstructor-Xcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Init constructor Xcode

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.

How it works

  1. Open the playgroung InitConstructor
  2. 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"
]
  1. Run the playground
  2. Copy the printed result and paste it on Xcode

Voilà!

Result

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

About

💻 🖥️ Automatically generate the init constructor of Xcode.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors