iamjc015
iamjc015

Reputation: 2235

Unable to load Nativescript IOS App Resources Images

I have the following App_Resources Folder:

enter image description here

Here is how I used the image:

<Image src="res://asianconnectlogo" width="75%" class="logo"></Image>

However the image is not loading at all. Why is that so?

I tried tns prepare ios but still not working and the resources are not copied into platforms folder.

Thanks!

Upvotes: 1

Views: 319

Answers (1)

Manoj
Manoj

Reputation: 21908

Changes on App_Resources will usually be detected and CLI will perform a rebuild automatically. But it may fail sometimes in which case you shall perform a clean build manually by running tns platform clean <Platform> Or alternatively by simply deleting the platforms folder.

Also, I'm not sure which layout you are using to place the Image, try setting a height too to make sure the image has enough space to display the image.

Upvotes: 1

Related Questions