diff options
author | kingces95 <kingces95@users.noreply.github.com> | 2017-03-07 14:56:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-07 14:56:24 -0500 |
commit | e6d5186c8acbf37b877c7ca3c77a378352a3743d (patch) | |
tree | d61ca8ea619f7844e9e0a973dbd7bac794e39147 /Xamarin.Forms.Platform.iOS | |
parent | 2b92142ab2a501de71d3572efc0e5deb2b7bae9a (diff) | |
download | xamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.tar.gz xamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.tar.bz2 xamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.zip |
Remove InternalsVisibleTo from Core to XF.Platforms.* (#782)
* Remove InternalsVisibleTo from Core to XF.Platforms.*
* Changes per Jason's code review
* Move LockableObservableListWrapper to internals namespace
* Changes per Stephane's code review
* update docs
* Touch code to get CI to run tests
* Rebase; Update documentation
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
29 files changed, 63 insertions, 37 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs b/Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs index b42f69f4..2c0ffb43 100644 --- a/Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs +++ b/Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs @@ -47,7 +47,7 @@ namespace Xamarin.Forms.Platform.iOS { var id = cell.GetType().FullName; - var renderer = (CellRenderer)Registrar.Registered.GetHandler(cell.GetType()); + var renderer = (CellRenderer)Internals.Registrar.Registered.GetHandler<IRegisterable>(cell.GetType()); ContextActionsCell contextCell = null; UITableViewCell reusableCell = null; diff --git a/Xamarin.Forms.Platform.iOS/Cells/ImageCellRenderer.cs b/Xamarin.Forms.Platform.iOS/Cells/ImageCellRenderer.cs index 38aae375..d78a1631 100644 --- a/Xamarin.Forms.Platform.iOS/Cells/ImageCellRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Cells/ImageCellRenderer.cs @@ -39,7 +39,7 @@ namespace Xamarin.Forms.Platform.iOS IImageSourceHandler handler; - if (source != null && (handler = Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null) + if (source != null && (handler = Internals.Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null) { UIImage uiimage; try diff --git a/Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs b/Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs index 697608fe..3957feba 100644 --- a/Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs @@ -167,7 +167,7 @@ namespace Xamarin.Forms.Platform.iOS if (renderer.Element != null && renderer == Platform.GetRenderer(renderer.Element)) renderer.Element.ClearValue(Platform.RendererProperty); - var type = Registrar.Registered.GetHandlerType(_viewCell.View.GetType()); + var type = Internals.Registrar.Registered.GetHandlerType(_viewCell.View.GetType()); if (renderer.GetType() == type || (renderer is Platform.DefaultRenderer && type == null)) renderer.SetElement(_viewCell.View); else diff --git a/Xamarin.Forms.Platform.iOS/Deserializer.cs b/Xamarin.Forms.Platform.iOS/Deserializer.cs index dcef049c..5fc19f4f 100644 --- a/Xamarin.Forms.Platform.iOS/Deserializer.cs +++ b/Xamarin.Forms.Platform.iOS/Deserializer.cs @@ -5,6 +5,7 @@ using System.IO.IsolatedStorage; using System.Runtime.Serialization; using System.Threading.Tasks; using System.Xml; +using Xamarin.Forms.Internals; #if __MOBILE__ namespace Xamarin.Forms.Platform.iOS diff --git a/Xamarin.Forms.Platform.iOS/EventTracker.cs b/Xamarin.Forms.Platform.iOS/EventTracker.cs index 596506a5..8fe1d1d2 100644 --- a/Xamarin.Forms.Platform.iOS/EventTracker.cs +++ b/Xamarin.Forms.Platform.iOS/EventTracker.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.Linq; +using Xamarin.Forms.Internals; #if __MOBILE__ using UIKit; diff --git a/Xamarin.Forms.Platform.iOS/Extensions/ArrayExtensions.cs b/Xamarin.Forms.Platform.iOS/Extensions/ArrayExtensions.cs index 9adafecb..ac770084 100644 --- a/Xamarin.Forms.Platform.iOS/Extensions/ArrayExtensions.cs +++ b/Xamarin.Forms.Platform.iOS/Extensions/ArrayExtensions.cs @@ -1,4 +1,5 @@ using System; +using Xamarin.Forms.Internals; namespace Xamarin.Forms.Platform.iOS { diff --git a/Xamarin.Forms.Platform.iOS/Extensions/Extensions.cs b/Xamarin.Forms.Platform.iOS/Extensions/Extensions.cs index 3b24c1a8..1aa4d36c 100644 --- a/Xamarin.Forms.Platform.iOS/Extensions/Extensions.cs +++ b/Xamarin.Forms.Platform.iOS/Extensions/Extensions.cs @@ -1,4 +1,5 @@ using UIKit; +using Xamarin.Forms.Internals; namespace Xamarin.Forms.Platform.iOS { diff --git a/Xamarin.Forms.Platform.iOS/Extensions/UIViewExtensions.cs b/Xamarin.Forms.Platform.iOS/Extensions/UIViewExtensions.cs index 8248af11..a6419729 100644 --- a/Xamarin.Forms.Platform.iOS/Extensions/UIViewExtensions.cs +++ b/Xamarin.Forms.Platform.iOS/Extensions/UIViewExtensions.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; using static System.String; +using Xamarin.Forms.Internals; #if __MOBILE__ using UIKit; namespace Xamarin.Forms.Platform.iOS diff --git a/Xamarin.Forms.Platform.iOS/Forms.cs b/Xamarin.Forms.Platform.iOS/Forms.cs index d6589624..f2ba923f 100644 --- a/Xamarin.Forms.Platform.iOS/Forms.cs +++ b/Xamarin.Forms.Platform.iOS/Forms.cs @@ -71,19 +71,19 @@ namespace Xamarin.Forms if (IsInitialized) return; IsInitialized = true; - Color.Accent = Color.FromRgba(50, 79, 133, 255); + Color.SetAccent(Color.FromRgba(50, 79, 133, 255)); Log.Listeners.Add(new DelegateLogListener((c, m) => Trace.WriteLine(m, c))); #if __MOBILE__ - Device.Idiom = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad ? TargetIdiom.Tablet : TargetIdiom.Phone; + Device.SetIdiom(UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad ? TargetIdiom.Tablet : TargetIdiom.Phone); #else - Device.Idiom = TargetIdiom.Desktop; + Device.SetIdiom(TargetIdiom.Desktop); #endif Device.PlatformServices = new IOSPlatformServices(); Device.Info = new IOSDeviceInfo(); - Registrar.RegisterAll(new[] + Internals.Registrar.RegisterAll(new[] { typeof(ExportRendererAttribute), typeof(ExportCellAttribute), typeof(ExportImageSourceHandlerAttribute) }); ExpressionSearch.Default = new iOSExpressionSearch(); } @@ -306,13 +306,13 @@ namespace Xamarin.Forms return Task.FromResult(_isolatedStorageFile.GetLastWriteTime(path)); } - public Task<Stream> OpenFileAsync(string path, FileMode mode, FileAccess access) + public Task<Stream> OpenFileAsync(string path, Internals.FileMode mode, Internals.FileAccess access) { Stream stream = _isolatedStorageFile.OpenFile(path, (System.IO.FileMode)mode, (System.IO.FileAccess)access); return Task.FromResult(stream); } - public Task<Stream> OpenFileAsync(string path, FileMode mode, FileAccess access, FileShare share) + public Task<Stream> OpenFileAsync(string path, Internals.FileMode mode, Internals.FileAccess access, Internals.FileShare share) { Stream stream = _isolatedStorageFile.OpenFile(path, (System.IO.FileMode)mode, (System.IO.FileAccess)access, (System.IO.FileShare)share); diff --git a/Xamarin.Forms.Platform.iOS/FormsApplicationDelegate.cs b/Xamarin.Forms.Platform.iOS/FormsApplicationDelegate.cs index da51718c..a4ffd895 100644 --- a/Xamarin.Forms.Platform.iOS/FormsApplicationDelegate.cs +++ b/Xamarin.Forms.Platform.iOS/FormsApplicationDelegate.cs @@ -117,7 +117,7 @@ namespace Xamarin.Forms.Platform.iOS if (application == null) throw new ArgumentNullException("application"); - Application.Current = application; + Application.SetCurrentApplication(application); _application = application; (application as IApplicationController)?.SetAppIndexingProvider(new IOSAppIndexingProvider()); diff --git a/Xamarin.Forms.Platform.iOS/NativeBindingService.cs b/Xamarin.Forms.Platform.iOS/NativeBindingService.cs index 3756e2f0..b19fdb14 100644 --- a/Xamarin.Forms.Platform.iOS/NativeBindingService.cs +++ b/Xamarin.Forms.Platform.iOS/NativeBindingService.cs @@ -1,11 +1,12 @@ using System; using UIKit; +using Xamarin.Forms.Xaml.Internals; [assembly: Xamarin.Forms.Dependency(typeof(Xamarin.Forms.Platform.iOS.NativeBindingService))] namespace Xamarin.Forms.Platform.iOS { - class NativeBindingService : Xaml.INativeBindingService + class NativeBindingService : INativeBindingService { public bool TrySetBinding(object target, string propertyName, BindingBase binding) { diff --git a/Xamarin.Forms.Platform.iOS/NativeValueConverterService.cs b/Xamarin.Forms.Platform.iOS/NativeValueConverterService.cs index acdd6523..d2ead786 100644 --- a/Xamarin.Forms.Platform.iOS/NativeValueConverterService.cs +++ b/Xamarin.Forms.Platform.iOS/NativeValueConverterService.cs @@ -1,6 +1,9 @@ using System; +using Xamarin.Forms.Xaml.Internals; +using Xamarin.Forms.Internals; #if __MOBILE__ using UIKit; + [assembly: Xamarin.Forms.Dependency(typeof(Xamarin.Forms.Platform.iOS.NativeValueConverterService))] namespace Xamarin.Forms.Platform.iOS #else @@ -11,7 +14,7 @@ using UIView = AppKit.NSView; namespace Xamarin.Forms.Platform.MacOS #endif { - class NativeValueConverterService : Xaml.INativeValueConverterService + class NativeValueConverterService : INativeValueConverterService { public bool ConvertTo(object value, Type toType, out object nativeValue) { diff --git a/Xamarin.Forms.Platform.iOS/Platform.cs b/Xamarin.Forms.Platform.iOS/Platform.cs index 586892f7..a629d676 100644 --- a/Xamarin.Forms.Platform.iOS/Platform.cs +++ b/Xamarin.Forms.Platform.iOS/Platform.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Foundation; using UIKit; using RectangleF = CoreGraphics.CGRect; +using Xamarin.Forms.Internals; namespace Xamarin.Forms.Platform.iOS { @@ -188,7 +189,7 @@ namespace Xamarin.Forms.Platform.iOS public static IVisualElementRenderer CreateRenderer(VisualElement element) { var t = element.GetType(); - var renderer = Registrar.Registered.GetHandler<IVisualElementRenderer>(t) ?? new DefaultRenderer(); + var renderer = Internals.Registrar.Registered.GetHandler<IVisualElementRenderer>(t) ?? new DefaultRenderer(); renderer.SetElement(element); return renderer; } diff --git a/Xamarin.Forms.Platform.iOS/RendererPool.cs b/Xamarin.Forms.Platform.iOS/RendererPool.cs index 38fe3c02..7c7e4458 100644 --- a/Xamarin.Forms.Platform.iOS/RendererPool.cs +++ b/Xamarin.Forms.Platform.iOS/RendererPool.cs @@ -34,7 +34,7 @@ namespace Xamarin.Forms.Platform.MacOS if (view == null) throw new ArgumentNullException("view"); - var rendererType = Registrar.Registered.GetHandlerType(view.GetType()) ?? typeof(ViewRenderer); + var rendererType = Internals.Registrar.Registered.GetHandlerType(view.GetType()) ?? typeof(ViewRenderer); Stack<IVisualElementRenderer> renderers; if (!_freeRenderers.TryGetValue(rendererType, out renderers) || renderers.Count == 0) diff --git a/Xamarin.Forms.Platform.iOS/Renderers/ButtonRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/ButtonRenderer.cs index 5eb9b777..dbdcb241 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/ButtonRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/ButtonRenderer.cs @@ -137,7 +137,7 @@ namespace Xamarin.Forms.Platform.iOS { IImageSourceHandler handler; FileImageSource source = Element.Image; - if (source != null && (handler = Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null) + if (source != null && (handler = Internals.Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null) { UIImage uiimage; try diff --git a/Xamarin.Forms.Platform.iOS/Renderers/FontExtensions.cs b/Xamarin.Forms.Platform.iOS/Renderers/FontExtensions.cs index ba8acbe5..2ddd11c8 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/FontExtensions.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/FontExtensions.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; using Xamarin.Forms; +using Xamarin.Forms.Internals; #if __MOBILE__ using UIKit; namespace Xamarin.Forms.Platform.iOS diff --git a/Xamarin.Forms.Platform.iOS/Renderers/FormattedStringExtensions.cs b/Xamarin.Forms.Platform.iOS/Renderers/FormattedStringExtensions.cs index 825a20bd..446cc95e 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/FormattedStringExtensions.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/FormattedStringExtensions.cs @@ -1,6 +1,8 @@ using Foundation; +using Xamarin.Forms.Internals; #if __MOBILE__ using UIKit; + namespace Xamarin.Forms.Platform.iOS #else using AppKit; diff --git a/Xamarin.Forms.Platform.iOS/Renderers/ImageRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/ImageRenderer.cs index 6f6392b1..760a714b 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/ImageRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/ImageRenderer.cs @@ -108,7 +108,7 @@ namespace Xamarin.Forms.Platform.iOS ((IImageController)Element).SetIsLoading(true); - if (source != null && (handler = Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null) + if (source != null && (handler = Internals.Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null) { UIImage uiimage; try diff --git a/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs index be95731b..b4333c63 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs @@ -403,7 +403,7 @@ namespace Xamarin.Forms.Platform.iOS if (_footerRenderer != null) { _footerRenderer.Element.MeasureInvalidated -= OnFooterMeasureInvalidated; - if (footer != null && _footerRenderer.GetType() == Registrar.Registered.GetHandlerType(footer.GetType())) + if (footer != null && _footerRenderer.GetType() == Internals.Registrar.Registered.GetHandlerType(footer.GetType())) { _footerRenderer.SetElement(footerView); return; @@ -449,7 +449,7 @@ namespace Xamarin.Forms.Platform.iOS if (_headerRenderer != null) { _headerRenderer.Element.MeasureInvalidated -= OnHeaderMeasureInvalidated; - if (header != null && _headerRenderer.GetType() == Registrar.Registered.GetHandlerType(header.GetType())) + if (header != null && _headerRenderer.GetType() == Internals.Registrar.Registered.GetHandlerType(header.GetType())) { _headerRenderer.SetElement(headerView); return; @@ -839,7 +839,7 @@ namespace Xamarin.Forms.Platform.iOS if (cell.HasContextActions) throw new NotSupportedException("Header cells do not support context actions"); - var renderer = (CellRenderer)Registrar.Registered.GetHandler(cell.GetType()); + var renderer = (CellRenderer)Internals.Registrar.Registered.GetHandler<IRegisterable>(cell.GetType()); var view = new HeaderWrapperView(); view.AddSubview(renderer.GetCell(cell, null, tableView)); diff --git a/Xamarin.Forms.Platform.iOS/Renderers/NavigationMenuRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/NavigationMenuRenderer.cs index 2ea8a008..11a8558f 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/NavigationMenuRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/NavigationMenuRenderer.cs @@ -4,6 +4,7 @@ using Foundation; using UIKit; using RectangleF = CoreGraphics.CGRect; using SizeF = CoreGraphics.CGSize; +using Xamarin.Forms.Internals; namespace Xamarin.Forms.Platform.iOS { @@ -109,6 +110,8 @@ namespace Xamarin.Forms.Platform.iOS _menu = menu; } + INavigationMenuController MenuController => _menu; + public override UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath) { var cell = (NavigationCell)collectionView.DequeueReusableCell(new NSString("NavigationCell"), indexPath); @@ -118,7 +121,7 @@ namespace Xamarin.Forms.Platform.iOS { cell.Name = target.Title; cell.Icon = target.Icon; - cell.Selected = () => _menu.SendTargetSelected(target); + cell.Selected = () => MenuController.SendTargetSelected(target); } else { diff --git a/Xamarin.Forms.Platform.iOS/Renderers/PageRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/PageRenderer.cs index 1c7730e8..2b702fde 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/PageRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/PageRenderer.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using Xamarin.Forms.Internals; using UIKit; using PageUIStatusBarAnimation = Xamarin.Forms.PlatformConfiguration.iOSSpecific.UIStatusBarAnimation; using Xamarin.Forms.PlatformConfiguration.iOSSpecific; diff --git a/Xamarin.Forms.Platform.iOS/Renderers/ScrollViewRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/ScrollViewRenderer.cs index c9c24ad6..244edfaf 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/ScrollViewRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/ScrollViewRenderer.cs @@ -1,5 +1,6 @@ using System; using System.ComponentModel; +using Xamarin.Forms.Internals; using UIKit; using PointF = CoreGraphics.CGPoint; using RectangleF = CoreGraphics.CGRect; diff --git a/Xamarin.Forms.Platform.iOS/Renderers/TableViewModelRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/TableViewModelRenderer.cs index b8a6fc95..060b9d20 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/TableViewModelRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/TableViewModelRenderer.cs @@ -58,7 +58,7 @@ namespace Xamarin.Forms.Platform.iOS { var reusable = tableView.DequeueReusableCell(result.GetType().FullName); - var cellRenderer = Registrar.Registered.GetHandler<CellRenderer>(result.GetType()); + var cellRenderer = Internals.Registrar.Registered.GetHandler<CellRenderer>(result.GetType()); return cellRenderer.GetCell(result, reusable, Table); } return null; diff --git a/Xamarin.Forms.Platform.iOS/Renderers/WebViewRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/WebViewRenderer.cs index 390e16d2..c54c0c96 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/WebViewRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/WebViewRenderer.cs @@ -20,6 +20,8 @@ namespace Xamarin.Forms.Platform.iOS { } + IWebViewController ElementController => Element as IWebViewController; + public VisualElement Element { get; private set; } public event EventHandler<VisualElementChangedEventArgs> ElementChanged; @@ -34,9 +36,9 @@ namespace Xamarin.Forms.Platform.iOS var oldElement = Element; Element = element; Element.PropertyChanged += HandlePropertyChanged; - ((WebView)Element).EvalRequested += OnEvalRequested; - ((WebView)Element).GoBackRequested += OnGoBackRequested; - ((WebView)Element).GoForwardRequested += OnGoForwardRequested; + ElementController.EvalRequested += OnEvalRequested; + ElementController.GoBackRequested += OnGoBackRequested; + ElementController.GoForwardRequested += OnGoForwardRequested; Delegate = new CustomWebViewDelegate(this); BackgroundColor = UIColor.Clear; @@ -96,9 +98,9 @@ namespace Xamarin.Forms.Platform.iOS StopLoading(); Element.PropertyChanged -= HandlePropertyChanged; - ((WebView)Element).EvalRequested -= OnEvalRequested; - ((WebView)Element).GoBackRequested -= OnGoBackRequested; - ((WebView)Element).GoForwardRequested -= OnGoForwardRequested; + ElementController.EvalRequested -= OnEvalRequested; + ElementController.GoBackRequested -= OnGoBackRequested; + ElementController.GoForwardRequested -= OnGoForwardRequested; _tracker?.Dispose(); _packager?.Dispose(); @@ -160,8 +162,8 @@ namespace Xamarin.Forms.Platform.iOS void UpdateCanGoBackForward() { - ((WebView)Element).CanGoBack = CanGoBack; - ((WebView)Element).CanGoForward = CanGoForward; + ElementController.CanGoBack = CanGoBack; + ElementController.CanGoForward = CanGoForward; } class CustomWebViewDelegate : UIWebViewDelegate @@ -176,6 +178,8 @@ namespace Xamarin.Forms.Platform.iOS _renderer = renderer; } + IWebViewController WebViewController => WebView; + WebView WebView { get { return (WebView)_renderer.Element; } @@ -184,7 +188,7 @@ namespace Xamarin.Forms.Platform.iOS public override void LoadFailed(UIWebView webView, NSError error) { var url = GetCurrentUrl(); - WebView.SendNavigated(new WebNavigatedEventArgs(_lastEvent, new UrlWebViewSource { Url = url }, url, WebNavigationResult.Failure)); + WebViewController.SendNavigated(new WebNavigatedEventArgs(_lastEvent, new UrlWebViewSource { Url = url }, url, WebNavigationResult.Failure)); _renderer.UpdateCanGoBackForward(); } @@ -200,7 +204,7 @@ namespace Xamarin.Forms.Platform.iOS _renderer._ignoreSourceChanges = false; var args = new WebNavigatedEventArgs(_lastEvent, WebView.Source, url, WebNavigationResult.Success); - WebView.SendNavigated(args); + WebViewController.SendNavigated(args); _renderer.UpdateCanGoBackForward(); } @@ -238,7 +242,7 @@ namespace Xamarin.Forms.Platform.iOS var lastUrl = request.Url.ToString(); var args = new WebNavigatingEventArgs(navEvent, new UrlWebViewSource { Url = lastUrl }, lastUrl); - WebView.SendNavigating(args); + WebViewController.SendNavigating(args); _renderer.UpdateCanGoBackForward(); return !args.Cancel; } diff --git a/Xamarin.Forms.Platform.iOS/ResourcesProvider.cs b/Xamarin.Forms.Platform.iOS/ResourcesProvider.cs index f02655a0..0bccc603 100644 --- a/Xamarin.Forms.Platform.iOS/ResourcesProvider.cs +++ b/Xamarin.Forms.Platform.iOS/ResourcesProvider.cs @@ -1,9 +1,12 @@ #if __MOBILE__ using UIKit; +using Xamarin.Forms.Internals; namespace Xamarin.Forms.Platform.iOS #else +using Xamarin.Forms.Internals; + namespace Xamarin.Forms.Platform.MacOS #endif { diff --git a/Xamarin.Forms.Platform.iOS/ViewRenderer.cs b/Xamarin.Forms.Platform.iOS/ViewRenderer.cs index 8a433c91..a785fb0f 100644 --- a/Xamarin.Forms.Platform.iOS/ViewRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/ViewRenderer.cs @@ -114,7 +114,7 @@ namespace Xamarin.Forms.Platform.MacOS protected override void OnRegisterEffect(PlatformEffect effect) { base.OnRegisterEffect(effect); - effect.Control = Control; + effect.SetControl(Control); } #if __MOBILE__ protected override void SetAccessibilityHint() diff --git a/Xamarin.Forms.Platform.iOS/VisualElementRenderer.cs b/Xamarin.Forms.Platform.iOS/VisualElementRenderer.cs index 57c9ab12..3fcb3ff1 100644 --- a/Xamarin.Forms.Platform.iOS/VisualElementRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/VisualElementRenderer.cs @@ -105,8 +105,8 @@ namespace Xamarin.Forms.Platform.MacOS if (platformEffect == null) return; - platformEffect.Container = container; - platformEffect.Control = control; + platformEffect.SetContainer(container); + platformEffect.SetControl(control); } void IEffectControlProvider.RegisterEffect(Effect effect) @@ -291,7 +291,7 @@ namespace Xamarin.Forms.Platform.MacOS protected virtual void OnRegisterEffect(PlatformEffect effect) { - effect.Container = this; + effect.SetContainer(this); } #if __MOBILE__ diff --git a/Xamarin.Forms.Platform.iOS/VisualElementTracker.cs b/Xamarin.Forms.Platform.iOS/VisualElementTracker.cs index 29840e2d..205aa1de 100644 --- a/Xamarin.Forms.Platform.iOS/VisualElementTracker.cs +++ b/Xamarin.Forms.Platform.iOS/VisualElementTracker.cs @@ -3,6 +3,7 @@ using System.ComponentModel; using System.Drawing; using System.Threading; using CoreAnimation; +using Xamarin.Forms.Internals; #if __MOBILE__ namespace Xamarin.Forms.Platform.iOS diff --git a/Xamarin.Forms.Platform.iOS/iOSAppLinks.cs b/Xamarin.Forms.Platform.iOS/iOSAppLinks.cs index f8771a93..1a5f7c73 100644 --- a/Xamarin.Forms.Platform.iOS/iOSAppLinks.cs +++ b/Xamarin.Forms.Platform.iOS/iOSAppLinks.cs @@ -109,7 +109,7 @@ namespace Xamarin.Forms.Platform.iOS var source = deepLinkUri.Thumbnail; IImageSourceHandler handler; - if (source != null && (handler = Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null) + if (source != null && (handler = Internals.Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null) { UIImage uiimage; try |