Browse Source

Don't use WebKit on tvOS samples

xy-focus-and-tvos
Max Katz 2 years ago
parent
commit
7a985ee00e
  1. 5
      samples/ControlCatalog.iOS/EmbedSample.iOS.cs

5
samples/ControlCatalog.iOS/EmbedSample.iOS.cs

@ -3,7 +3,6 @@ using Avalonia.Platform;
using CoreGraphics;
using Foundation;
using UIKit;
using WebKit;
using Avalonia.iOS;
using ControlCatalog.Pages;
@ -13,14 +12,16 @@ public class EmbedSampleIOS : INativeDemoControl
{
public IPlatformHandle CreateControl(bool isSecond, IPlatformHandle parent, Func<IPlatformHandle> createDefault)
{
#if !TVOS
if (isSecond)
{
var webView = new WKWebView(CGRect.Empty, new WKWebViewConfiguration());
var webView = new WebKit.WKWebView(CGRect.Empty, new WebKit.WKWebViewConfiguration());
webView.LoadRequest(new NSUrlRequest(new NSUrl("https://www.apple.com/")));
return new UIViewControlHandle(webView);
}
else
#endif
{
var button = new UIButton();
var clickCount = 0;

Loading…
Cancel
Save