[英]how to add jpg image to IOs project for Visual studio with xamarin
I got a problem in my project in Visual studio with Xamarin. 我在Xamarin的Visual Studio项目中遇到问题。 I want to add a .jpg image to images sets in IOS project's asset catalog.
我想向IOS项目资产目录中的图像集添加.jpg图像。 But VS allow me add only .png files.
但是VS只允许我添加.png文件。 Is there any way to add .jpg image to use it in storyboard and in code.
有什么方法可以添加.jpg图像,以便在情节提要和代码中使用它。
You can add them under the folder Resources
. 您可以将它们添加到“
Resources
”文件夹下。 Detail Refer Working With Resources 详细信息请参阅使用资源
In Code 在代码中
image.Image = UIImage.FromBundle("test.jpg");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.