在ipad / ios设备中加载Webview时遇到问题。
仅供参考
我正在执行一个api调用,该调用返回html内容并使用“ htmlwebviewsource”尝试将html加载到ipad中。
这是mainpage.xaml中用于Webview的代码段:-
<WebView x:Name="webView"
VerticalOptions="FillAndExpand"
Visual="Material"
HeightRequest="1000"
WidthRequest="1000"
IsVisible="False"
Grid.Row="2"
Grid.RowSpan="5"
Grid.ColumnSpan="2"/>
</Grid>
</StackLayout>
这是mainpage.xaml.cs中的代码段:-
var htmlSource = new HtmlWebViewSource();
Button btn = (Button)sender;
htmlSource.Html = CreateApiHeader(btn.ClassId);
webView.Source = htmlSource;
webView.IsVisible = true;
我需要做什么样的代码级更改,以便Webview开始在我的ipad / ios上重新出现,或者我在所有方面都缺少某些东西才能使之成为可能。