Awesome
ThenGenerator
<p align=center> <a href="https://apps.apple.com/us/app/thengenerator/id1499993324?mt=12&itscg=30200&itsct=apps_box" style="width: 170px; height: 170px; border-top-left-radius: 22%; border-top-right-radius: 22%; border-bottom-right-radius: 22%; border-bottom-left-radius: 22%; overflow: hidden; display: inline-block; vertical-align: middle;"><img src="./.github/images/icon_512x512.png" alt="ThenGenerator" style="width: 170px; height: 170px; border-top-left-radius: 22%; border-top-right-radius: 22%; border-bottom-right-radius: 22%; border-bottom-left-radius: 22%; overflow: hidden; display: inline-block; vertical-align: middle;"></a> </p>Overview
ThenGenerator is Xcode Source Editor Extension for Then
Install
<a href="https://apps.apple.com/us/app/thengenerator/id1499993324?mt=12&itsct=apps_box&itscg=30200" style="display: inline-block; overflow: hidden; border-top-left-radius: 13px; border-top-right-radius: 13px; border-bottom-right-radius: 13px; border-bottom-left-radius: 13px; width: 250px; height: 83px;"><img src="https://tools.applemediaservices.com/api/badges/download-on-the-mac-app-store/black/en-US?size=250x83&releaseDate=1610668800&h=b1b571a8554d47f187619067dd9c33a0" alt="Download on the Mac App Store" style="border-top-left-radius: 13px; border-top-right-radius: 13px; border-bottom-right-radius: 13px; border-bottom-left-radius: 13px; width: 250px; height: 83px;"></a>
Enviroment
- macOS 11.0 (Big Sur)
- SwiftUI
- UserDefaults
How to use
-
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
-
<img src="./.github/images/manual.png">Editor
->ThenGenerator
->Generate Then Code
Use Shortcut
- Xcode Preferences.. (
⌘
+,
) - Key Bindings
- Search ThenGenerator
- Add Shortcut
Change Properties
- Launch
ThenGeneratorApp
- Find
UIKit
class and turn on/off switch
Demo
<table> <tr> <th>Single</th> </tr> <td> <img src="./.github/images/single.gif"> </td> <tr> <th>Multiline</th> </tr> <td> <img src="./.github/images/multiLine.gif"> </td> </table>Contribution
Xcodegen Support
- 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.