locked
How to use asset catalog with vector pdf iOS RRS feed

  • Question

  • User283453 posted

    Hello all,

    I'm trying to add images to the iOS project of my SCL following the new "apple way". I added a new asset images catalog to the iOS project and a new vector image to pdf format. The doc says it will automatically generates according images at compile time but I don't see any images.

    I already have asset catalog for appIcon and launchImages, and its working well. I noticed that I don't have a line referencing the new added catalog of images in the info.plist.

    • How can I load it (I thought it would do it alone) properly ? What's the syntax to refer to it in info.plist ?

    • Final question : Can I use the vector image in my project as a source for image of xamarin forms like I do now to refer to Android images stored in Resources => Image ="imageName" . Or should I use .png images like the old way to use the same reference in my SCL project ?

    I want to load an Image for pin on map and I thought pdf file will help me to solve resolution probs for iOS project (As I can't figure out what resolution to use to get a nice image on iOS, its always too small or too big using x1 x2 x3 compared to my Android proj).

    I've been following the doc presented here : https://developer.xamarin.com/guides/ios/applicationfundamentals/workingwith_images/displaying-an-image/#asset-catalogs

    Thanks.

    Saturday, January 20, 2018 12:34 PM

Answers

  • User283453 posted

    Found a working answer here : https://stackoverflow.com/questions/36796571/is-it-possible-to-use-image-set-in-a-xamarin-forms

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Sunday, January 21, 2018 1:05 PM

All replies

  • User283453 posted

    Found a working answer here : https://stackoverflow.com/questions/36796571/is-it-possible-to-use-image-set-in-a-xamarin-forms

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Sunday, January 21, 2018 1:05 PM
  • User324119 posted

    @Umar3x said: Found a working answer here : https://stackoverflow.com/questions/36796571/is-it-possible-to-use-image-set-in-a-xamarin-forms

    hello. I try to add PDF image using asset catalog. I add Image Set and open my image in "Vector" field. But after loading and building nothing happens. I don't see anything in 1x/2x/3x fields and image doesn't appears in resources folder.

    Tuesday, January 23, 2018 9:16 PM
  • User283453 posted

    Hello,

    You won't see them, its generated at compile time. Name your image asset catalog the exact same way you want to use it as a source : for example if you want to use ImageSource { Source = "bubble" } name your Image Set Catalog "bubble".

    Tuesday, January 23, 2018 10:39 PM