【发布时间】:2016-05-25 02:47:07
【问题描述】:
我正在开发 Xamarin Studio,我有一个 Storyboard,其中包含一个 UIImageView,其属性设置如下:
您会注意到所选图像名为 personalPhoto,它存在于 Images.xcassets 中,如下所示
但是当我在模拟器中运行应用程序时,图像没有加载.. UIImageView 看起来是空的
即使尝试使用此代码以编程方式添加 UIImageView .. 它给了我相同的结果
UIImageView personImage = new UIImageView {
Frame = new CoreGraphics.CGRect (0, 0, 200, 200),
Image = UIImage.FromBundle("personalPhoto"),
ContentMode = UIViewContentMode.ScaleAspectFill
};
this.View.AddSubview (personImage);
所以你知道是什么问题吗..请给我一些帮助..
提前感谢..
【问题讨论】:
标签: ios iphone image xamarin uiimageview