Creates a custom initializer from a list of properties
Main Features:
- Respects
nonnull
with a correspondingNSParameterAssert
- Respects
copy
qualifier. - Supports Objective-C and Swift
Also provided here is Phoenix - an Xcode plugin that allows you select the properties and create your custom initializer.
- Select your properties
- Go to Edit and then click Make Initializer And Copy OR use the key command CMD - Shift - X.
- Paste your initializer wherever you wish
You can install Phoenix by either...
- Install via alcatraz
- Go to releases and download the plugin and put it in
~/Library/Application Support/Developer/Shared/Xcode/Plug-ins
- You can build this project and it will be installed.
You should then restart Xcode, and enjoy!
- I want to add the ability to copy just the declaration of the initializer.
- Other language support?