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

Using TagsView causes Asset Catalog override #1

Open
merckxite opened this issue Apr 20, 2018 · 3 comments
Open

Using TagsView causes Asset Catalog override #1

merckxite opened this issue Apr 20, 2018 · 3 comments

Comments

@merckxite
Copy link

merckxite commented Apr 20, 2018

Hey @nmilcoff,

I've been attempting to use the MvxTagsView in my MVVMCross 5.7 project, but if I when I add the package, implement the MvxTagListView and build, my compiled binary is missing my assets from my Asset Catalog, and is instead replaced with the 'ic_removetag' asset from the Asset Catalog of this project (You can check this by inspecting the compiled Assets.car). I've tried to add an Asset Catalog in one of your samples and saw similar results.

Strangely, if I make some changes to my Asset Catalog (rename it, open it in Xcode, etc), it appears to bring all my assets back, but remove the ic_removetag asset. This means that whenever you set show 'enableTagButton' to true, we get an Mvx error because the button is initialised with that asset first, even if we set our own custom ButtonIcon.

I'll keep investigating with the hope of submitting a PR but wanted to submit an issue as you may have some other ideas. Cheers!

EDIT: I've been playing around trying to fix the TagsView and have found that deleting the Asset Catalog and the SetImage line in the Initialize method of the TagButtonView allows me to set my own ButtonIcon and everything works. I'll work on a more elegant solution so we can keep the default icon (probably FFImageLoading or a bitmap) and submit a PR when I get the chance 😎

@nmilcoff
Copy link
Owner

Hey @merckxite, that sounds good. I apologize for the delay!

I think TagButtonView definitely needs an improvement, or at least the library should provide an easier way to customize which control type to use (I'm thinking on a hook for when an individual TagView is created for example).

Did you get anywhere with this so far? Do you think you would be able to submit a PR adding a repro case to the sample otherwise? :)

@merckxite
Copy link
Author

Apologies for my belated reply @nmilcoff, I was in a rush to use the TagsView so I fixed it to achieve what I needed (which basically was to rip out the asset catalog). When I get a spare second I'll add that asset back in by another method like I mentioned previously and create a PR. I've also migrated the library and samples to MvvmCross 6 (thanks for your work on that!) so I'll include that as well 🎉

@nmilcoff
Copy link
Owner

nmilcoff commented Nov 2, 2018

Hi @merckxite, any news regarding this? Otherwise can you please make your work public so that I can take it from there?

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

No branches or pull requests

2 participants