Using xcassets images as src for img tag on UIWebView webpage

Xcode 5 provided the ability to manage all of your images in a single asset file, instead of a bunch of png options hanging around.

It works great with IB and Cocoa code, but when I try to link to photos from the built-in html, they just don't appear.

So the question is simple: is it possible to refer to xcasset images from embedded html in UIWebView?

+6
source share
1 answer

Apparently, if you open the application package, the images are mixed together in the mysterious binary .car format (with the exception of the icon and startup image, which are still copied as separate files).

Therefore, it is not possible to reference xcassets images from an html source. You will have to continue linking them separately.

+3
source

Source: https://habr.com/ru/post/954861/


All Articles