【发布时间】:2017-05-18 11:16:10
【问题描述】:
当我重新打开应用程序以查看图像时,出现以下错误:
Could not initialize an instance of the type 'UIKit.UIImage': the native 'initWithContentsOfFile:' method returned nil
是否可以通过设置忽略这个条件
MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure
假的?
下面的方法用于显示图像
private async Task DisplayImageFromImageUrl()
{
UIImage image;
image = new UIImage(eventImageEntity.EventsImageUrl);
}
在执行上述代码时,“image”显示“null”值。
【问题讨论】:
-
请添加失败的代码。否则,将很难帮助您解决手头的问题。
标签: xamarin.ios