diff options
author | Paul DiPietro <pauldipietro@users.noreply.github.com> | 2016-12-09 03:29:04 -0800 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-12-09 11:29:04 +0000 |
commit | c4b1c88f506ebf76a2a40f005b45ec9b24e46e1a (patch) | |
tree | 74a1d11fe3d9ff539f0e43c466f4b5092ad64b16 /Xamarin.Forms.Platform.iOS/Platform.cs | |
parent | 29a1529b7f762a75b6944f803c957638ce6dbed8 (diff) | |
download | xamarin-forms-c4b1c88f506ebf76a2a40f005b45ec9b24e46e1a.tar.gz xamarin-forms-c4b1c88f506ebf76a2a40f005b45ec9b24e46e1a.tar.bz2 xamarin-forms-c4b1c88f506ebf76a2a40f005b45ec9b24e46e1a.zip |
Deprecate iOS 8 and earlier (#626)
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/Platform.cs')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/Platform.cs | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Platform.cs b/Xamarin.Forms.Platform.iOS/Platform.cs index c9c31887..805aba7d 100644 --- a/Xamarin.Forms.Platform.iOS/Platform.cs +++ b/Xamarin.Forms.Platform.iOS/Platform.cs @@ -46,14 +46,7 @@ namespace Xamarin.Forms.Platform.iOS if (!PageIsChildOfPlatform(sender)) return; - if (Forms.IsiOS8OrNewer) - { - PresentAlert(arguments); - } - else - { - PresentPre8Alert(arguments); - } + PresentAlert(arguments); }); MessagingCenter.Subscribe(this, Page.ActionSheetSignalName, (Page sender, ActionSheetArguments arguments) => @@ -64,16 +57,8 @@ namespace Xamarin.Forms.Platform.iOS var pageRoot = sender; while (!Application.IsApplicationOrNull(pageRoot.RealParent)) pageRoot = (Page)pageRoot.RealParent; - var pageRenderer = GetRenderer(pageRoot); - if (Forms.IsiOS8OrNewer) - { - PresentActionSheet(arguments); - } - else - { - PresentPre8ActionSheet(arguments, pageRenderer); - } + PresentActionSheet(arguments); }); } @@ -452,12 +437,6 @@ namespace Xamarin.Forms.Platform.iOS alert.PopoverPresentationController.PermittedArrowDirections = 0; // No arrow } - if(!Forms.IsiOS9OrNewer) - { - // For iOS 8, we need to explicitly set the size of the window - window.Frame = new RectangleF(0, 0, UIScreen.MainScreen.Bounds.Width, UIScreen.MainScreen.Bounds.Height); - } - window.RootViewController.PresentViewController(alert, true, null); } @@ -491,18 +470,6 @@ namespace Xamarin.Forms.Platform.iOS await Task.Delay(5); } - void PresentPre8Alert(AlertArguments arguments) - { - UIAlertView alertView; - if (arguments.Accept != null) - alertView = new UIAlertView(arguments.Title, arguments.Message, null, arguments.Cancel, arguments.Accept); - else - alertView = new UIAlertView(arguments.Title, arguments.Message, null, arguments.Cancel); - - alertView.Dismissed += (o, args) => arguments.SetResult(args.ButtonIndex != 0); - alertView.Show(); - } - void PresentPre8ActionSheet(ActionSheetArguments arguments, IVisualElementRenderer pageRenderer) { var actionSheet = new UIActionSheet(arguments.Title, null, arguments.Cancel, arguments.Destruction, |