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