Skip to content
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

Option to give Image String instead of custom image String #16

Open
vchaubey-ontic opened this issue May 5, 2023 · 6 comments
Open
Labels
question Further information is requested

Comments

@vchaubey-ontic
Copy link

How could we give the asset string name instead of giving custom image name?

@onl1ner onl1ner added the question Further information is requested label May 5, 2023
@onl1ner
Copy link
Owner

onl1ner commented May 5, 2023

Hello, @vchaubey-ontic!

You can provide string with image name in your enum with tab items and use this string to show your custom images in the implementation of custom tab items (see TabItemStyle)

@vikaschaubey57
Copy link

@onl1ner as i checked the code everywhere you have used Image with SystemName Image(systemName: icon) but I want to use simple name like Image(icon), how to achieve it, could you give an example.

@onl1ner
Copy link
Owner

onl1ner commented May 11, 2023

@vikaschaubey57, I see. So, in this case you could implement your own tab item style and use your own image name there. The default implementation is using systemName initializer, because it is supposed to replicate the behavior of default tab bar

@Benetos
Copy link

Benetos commented May 25, 2023 via email

@jedmund
Copy link

jedmund commented Feb 23, 2024

Resurrecting this to say it is counter-intuitive to require systemName, or the documentation should at least say so. It would be great if the library provided an easy way to use Asset Library images as well without jumping through hoops.

@onl1ner
Copy link
Owner

onl1ner commented Feb 23, 2024

Well yeah, I see your point @jedmund. The systemName initializer is used only in the default implementation of style, but I will work on adding a way to easily use images from assets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants