-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New imageicon interface #132
Conversation
{% elif asset.type == "symbol" %} | ||
{{accessModifier}} static let {{asset.name|swiftIdentifier:"pretty"|lowerFirstWord|escapeReservedKeywords}} = {{symbolType}}(name: "{{asset.value}}") | ||
{% elif asset.items and ( forceNamespaces == "true" or asset.isNamespaced == "true" ) %} | ||
{{accessModifier}} enum {{asset.name|swiftIdentifier:"pretty"|escapeReservedKeywords}} { | ||
{% filter indent:2," ",true %}{% call casesBlock asset.items %}{% endfilter %} | ||
{{accessModifier}} enum {{asset.name|swiftIdentifier:"pretty"|escapeReservedKeywords}} : CaseIterable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ライブラリを使う側の人にとってはCaseIterableは不要だと思うので、ここでは削っていただけると 🙏
CaseIterableを付けたいと思ったのはSample側の話でした
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extensionでCaseIterableを書く場合、allCasesを自分で実装する必要があったため、やはりこの方針でいくのが良いとなった
@@ -148,7 +163,7 @@ | |||
{{accessModifier}} enum {{enumName}} { | |||
{% if catalogs.count > 1 or param.forceFileNameEnum %} | |||
{% for catalog in catalogs %} | |||
{{accessModifier}} enum {{catalog.name|swiftIdentifier:"pretty"|escapeReservedKeywords}} { | |||
{{accessModifier}} enum {{catalog.name|swiftIdentifier:"pretty"|escapeReservedKeywords}} : CaseIterable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここもCaseIterable無くて大丈夫です
解決したいこと
Image(charcoalIcon: .add)のように画像を設定できるようにする
やったこと
複数の AssetGroup をフラット化しています
動作確認環境
iOS 13 - iOS 16