ThenGenerator is Xcode Source Editor Extension for Then
- macOS 11.0 (Big Sur)
- SwiftUI
- UserDefaults
-
Install ThenGenerator
-
Enable Xcode Source Editor
->System Preferences
->Extensions
- Check
ThenGenerator
-
Input variable name for Generate code. Without
UI
prefix. -
If you want to create a UILabel class with variable name
repoNameLabel
, you input textVariableName + Label
-
Select variable name
-
Editor
->ThenGenerator
->Generate Then Code
- Xcode Preferences.. (
⌘
+,
) - Key Bindings
- Search ThenGenerator
- Add Shortcut
- Launch
ThenGeneratorApp
- Find
UIKit
class and turn on/off switch
Single |
---|
Multiline |
- Clone ->
xcodegen generate
If you find a bug or want to add a new property, find XXXXModel.swift
in Models Folder and fix or append property.
And find XXXXComponent.swift
in ComponentViews Folder and add SwitchView
with new property.