1

I have a table data and images to assets folder. I need to bind image by name from assets to TableCell How can I do it?

I've found old solutions for MVVMCross.Binding 5.7.0 with MvxImageViewLoader, but when I added it to solutions I got references duplicate. I realized that I can use converter for that, but I want to try avoid converter usage.
Also I can use ffimageloading package, but I didn't find any solution for it.

Atlantis
  • 725
  • 7
  • 26
  • Here is a similar case ,maybe it is useful https://stackoverflow.com/questions/18462371/using-mvximageviewloader-to-load-a-resource-image-is-it-possible – Lucas Zhang Oct 16 '18 at 07:25

2 Answers2

2

There is more simple that I've thought. Only 3 steps:

The first one:
set custom class for UIImageView enter image description here

The second one:
Create an outlet for UIImageView. Pay attention to type. enter image description here

And The third one:
bind URL
enter image description here

Atlantis
  • 725
  • 7
  • 26
-1

have you tried that in your cell?

_imageLoader = new MvxImageViewLoader(() => ImageView)
{
    DefaultImagePath = "res:" + NSBundle.MainBundle.PathForResource(imageName, "png")
};
Mustafa
  • 29
  • 1
  • 3