Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/115.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xamarin:在iOS上使用内部列表视图时未显示图像加载_Ios_Image_Xamarin_Image Loading_Ffimageloading - Fatal编程技术网

Xamarin:在iOS上使用内部列表视图时未显示图像加载

Xamarin:在iOS上使用内部列表视图时未显示图像加载,ios,image,xamarin,image-loading,ffimageloading,Ios,Image,Xamarin,Image Loading,Ffimageloading,我目前正在自定义数据模板内的listView上使用FFImageLoading库 <ListView.ItemTemplate> <DataTemplate> <ViewCell> <ViewCell.ContextActions> <M

我目前正在自定义数据模板内的listView上使用FFImageLoading库

<ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <ViewCell.ContextActions>
                                <MenuItem Clicked="OnDelete" CommandParameter="{Binding .}" Text="Delete" IsDestructive="True" />
                            </ViewCell.ContextActions>
                            <StackLayout
                                Padding="12,10,12,10" 
                                BackgroundColor="Transparent"
                                Orientation="Horizontal">
                                <Image
                                    DownsampleToViewSize="true"
                                    Aspect="AspectFit"
                                    Source="{Binding FileThumbnail, Converter={StaticResource mimeTypeToImageConverter}}"
                                    WidthRequest="60"
                                    HeightRequest="60">
                                </Image>
我在安卓上用过,但安卓很好用。当我切换回图像控制时,iOS将显示图像


我真的需要它来缩小图像的大小。你们中有没有人以前遇到过这个问题。

您需要使用FFImageLoading控件,而不是使用图像控件

改变

<Image>...</Image>
。。。

。。。
还要添加名称空间

<ContentPage xmlns:forms="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms">

CachedImage应具有与Image相同的所有属性


Oops忘了提到,您还需要添加DownSampleWight或DownsampleWidth以减小尺寸

您需要使用FFImageLoading控件,而不是使用图像控件

改变

<Image>...</Image>
。。。

。。。
还要添加名称空间

<ContentPage xmlns:forms="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms">

CachedImage应具有与Image相同的所有属性


Oops忘了提到,您还需要添加DownSampleWight或DownsampleWidth以减小尺寸

正在尝试通过http而不是https下载图像吗

您需要在info.plist中添加以下内容

<key>NSAppTransportSecurity</key>
<dict>
  <!--Include to allow all connections (DANGER)-->
  <key>NSAllowsArbitraryLoads</key>
      <true/>
</dict>
NSAppTransportSecurity
NSAllowsArbitraryLoads

是否尝试通过http而不是https下载图像

您需要在info.plist中添加以下内容

<key>NSAppTransportSecurity</key>
<dict>
  <!--Include to allow all connections (DANGER)-->
  <key>NSAllowsArbitraryLoads</key>
      <true/>
</dict>
NSAppTransportSecurity
NSAllowsArbitraryLoads

否我在手机中使用照片库中的照片。否我在手机中使用照片库中的照片。