Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.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
C# Xamarin Forms应用程序在UWP和Android中显示良好,但在iOS上显示不好_C#_Xamarin.forms_Xamarin.ios - Fatal编程技术网

C# Xamarin Forms应用程序在UWP和Android中显示良好,但在iOS上显示不好

C# Xamarin Forms应用程序在UWP和Android中显示良好,但在iOS上显示不好,c#,xamarin.forms,xamarin.ios,C#,Xamarin.forms,Xamarin.ios,我有一个应用程序,它从JSONAPI获取输入,使用Newtonsoft.Json库对其进行反序列化,然后使用datatemplate将其绑定到ListView 该应用程序在UWP和Android上运行良好,但在iOS上显示为空白屏幕。我没有在iOS方面做任何改变 下面是我的xaml文件的样子。为了显示我的列表,我还应该做什么 **我有所有软件包的最新更新,我将应用程序部署到模拟器和我的手机上,没有任何用处 <ListView x:Name="SoftTopicsListView"

我有一个应用程序,它从JSONAPI获取输入,使用Newtonsoft.Json库对其进行反序列化,然后使用datatemplate将其绑定到ListView

该应用程序在UWP和Android上运行良好,但在iOS上显示为空白屏幕。我没有在iOS方面做任何改变

下面是我的xaml文件的样子。为了显示我的列表,我还应该做什么

**我有所有软件包的最新更新,我将应用程序部署到模拟器和我的手机上,没有任何用处

 <ListView x:Name="SoftTopicsListView"
                  ItemsSource="{Binding Topics}"
                  VerticalOptions="FillAndExpand"
                  HasUnevenRows="True"
                  RefreshCommand="{Binding LoadItemsCommand}"
                  IsPullToRefreshEnabled="True"
                  IsRefreshing="{Binding IsBusy, Mode=OneWay}"
                  ItemSelected="OnItemSelected">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <ViewCell>
                        <StackLayout Padding="10">
                            <Image Source="{Binding ImgUrl}" VerticalOptions="Center" WidthRequest="200" HeightRequest="200"/>
                            <Label TextColor="Black" Text="{Binding Title}" LineBreakMode="NoWrap" FontSize="14" FontAttributes="Bold"/>
                            <Label TextColor="Black" Text="{Binding ShortDescription}" FontSize="11" LineBreakMode="TailTruncation"/>
                        </StackLayout>
                    </ViewCell>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

请帮帮我


尊敬的Omar。

请参见以下内容:您的数据服务是否使用SSL?顺便说一句,我记得当我将我的应用程序从Windows/Android移植到iOS时,ItemSelected必须替换为ItemTapped等。@JanAndersen它不使用SSL,它是我使用Razor页面编写的普通JSON api。我查看了VisualStudio提供的示例选项卡式页面,它使用几乎相同的代码正常工作!我真的不知道,这个问题让我抓狂。iOS都是关于安全的。。如果不使用SSL,则需要将JSON源添加到某种白名单中。@JanAndersen这就是解决方案!谢谢你,伙计。我将链接改为HTTPS,并按照指南为不受信任的URL添加了例外,所有这些都工作得很好。我欠你一条命。