locked
Add images to Asset Catalog RRS feed

  • Question

  • User184699 posted

    I tried to look for something similar to what is explained in this link http://developer.xamarin.com/guides/ios/applicationfundamentals/workingwith_images/displaying-an-image/#asset-catalogs to add image sets ( .png, @2x.png @3x.png) to my visual studio ios project and cannot find a way to add them. Please let me know how to accomplish this.

    Tuesday, January 12, 2016 1:37 AM

All replies

  • User76864 posted

    George,

    This, Unfortunately, is not supported in Visual Studio. Hopefully they will add it soon. There was a thread of a way to open you project in Xamarin Studio (on a Mac) add the Asset Catalog and images and then bring it back over to Visual Studio. There did seem to be people saying that the Asset Catalog would disappear at a later time. When I read that, I just gave up.

    Tuesday, January 12, 2016 9:57 PM
  • User184699 posted

    Ben thanks for the feedback. So can you add the @2x @3x etc images to the resources folder and have the project auto switch based on the device it is running on?

    Tuesday, January 12, 2016 10:01 PM
  • User76864 posted

    George,

    Yes. iOS will automatically pick the highest res asset it can support at run-time. If you are supporting iOS 8 and up only, the only time iOS will use the 1X images is on an older iPad.

    As best as I can tell (and someone please jump in if I am incorrect), the Assets Catalog is more for organization then any real sort of memory / performance improvements.

    Friday, January 15, 2016 2:50 PM
  • User103076 posted

    The xcassets catalog is used for App Slicing. Only the appropriately sized images are downloaded as part of the app from the App Store when they are stored this way.

    Monday, April 9, 2018 6:31 PM