MonoTouch UIImage.FromFile不加载视网膜资产

我正在用iOS7模拟器testing。 我的所有资产都只有@ 2x名称的视网膜。 我有一个非常奇怪的行为与UIImage.FromFile。 请注意,模拟器iPad和模拟器iPad Retina的行为是相同的。

基本上:

  • UIImage.FromBundle(“Images / close.png”),这将工作:它加载了close@2x.png并缩小
  • UIImage.FromFile(“Images / close.png”),这是行不通的
  • UIImage.FromFile(“Images / close @ 2x.png”),这加载图像,但我不知道它会做预期的事情(即:缩小它在非视网膜设备,并正确使用视网膜设备)

任何提示? 我以为iOS7是自动处理这个。

根据Xamarin文档 – 使用图像 (查看文章的最后) – Using FromFile is similar to using FromBundle, except that you have to pass the entire file path, including file suffix. ,所以这意味着如果你使用FromFile你应该在末尾添加@2x后缀。