protected virtual void Present()
        {
            Execute.BeginOnUIThread(() =>
            {
                var alertController = CreateAlertController();

                ApplyActions(alertController, Actions);

                var topViewController = _viewLocator.GetTopViewController();
                topViewController.PresentViewController(alertController, true, null);

                Actions.Clear();
            });
        }
Пример #2
0
        public void OpenVideo(string videoUrl)
        {
            var vc = _viewLocator.GetTopViewController();

            if (vc == null)
            {
                return;
            }

            var controller = new AVPlayerViewController();

            if (controller.Player == null)
            {
                controller.Player = new AVPlayer(NSUrl.FromString(videoUrl));
            }

            vc.PresentViewController(controller, true, null);
            controller.Player.Play();
        }
        private void Open()
        {
            var controller = new SupportRotationAlertController(_actionHeaderTitle, _actionHeaderMessage,
                                                                UIAlertControllerStyle.ActionSheet);

            foreach (var action in _actions)
            {
                controller.AddAction(UIAlertAction.Create(action.Title,
                                                          action.CommandActionStyle.ToNative(),
                                                          action.Command.Execute));
            }

            if (!Equals(TintColor, UIColor.Clear))
            {
                controller.View.TintColor = TintColor;
            }

            _viewLocator.GetTopViewController().PresentViewController(controller, true, null);

            if (!Equals(TintColor, UIColor.Clear))
            {
                controller.View.TintColor = TintColor;
            }
        }