Created
January 28, 2018 14:47
-
-
Save parallaxe/7815fc6a8ed98e2e66de20d65169d608 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen | |
{% set prefix %}UI{% endset %} | |
{% set controller %}ViewController{% endset %} | |
import Foundation | |
import UIKit | |
{% macro className scene %}{% filter removeNewlines %} | |
{% if scene.customClass %} | |
{% if scene.customModule %} | |
{% if not param.ignoreTargetModule or scene.customModule != env.PRODUCT_MODULE_NAME and scene.customModule != param.module %} | |
{{scene.customModule}}. | |
{% endif %} | |
{% endif %} | |
{{scene.customClass}} | |
{% else %} | |
{{prefix}}{{scene.baseType}} | |
{% endif %} | |
{% endfilter %}{% endmacro %} | |
{% for scene in customSceneTypes where scene.segues %} | |
{% set sceneClass %}{% call className scene %}{% endset %} | |
{{accessModifier}} extension {{sceneClass}} { | |
enum {{param.segueEnumName|default:"StoryboardSegue"}} { | |
{% for segue in scene.segues where segue.identifier %} | |
{% set segueID %}{{segue.identifier|swiftIdentifier:"pretty"|lowerFirstWord}}{% endset %} | |
case {{segueID|escapeReservedKeywords}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %} | |
{% endfor %} | |
} | |
} | |
} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment