MonoTouch.Dialog.ImageElement.Selected C# (CSharp) Method

Selected() public method

public Selected ( DialogViewController dvc, UITableView tableView, NSIndexPath path ) : void
dvc DialogViewController
tableView UITableView
path NSIndexPath
return void
        public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            if (picker == null)
                picker = new UIImagePickerController ();
            picker.Delegate = new MyDelegate (this, tableView, path);

            switch (UIDevice.CurrentDevice.UserInterfaceIdiom){
            case UIUserInterfaceIdiom.Pad:
                RectangleF useRect;
                popover = new UIPopoverController (picker);
                var cell = tableView.CellAt (path);
                if (cell == null)
                    useRect = rect;
                else
                    rect = cell.Frame;
                popover.PresentFromRect (rect, dvc.View, UIPopoverArrowDirection.Any, true);
                break;

            default:
            case UIUserInterfaceIdiom.Phone:
                dvc.ActivateController (picker);
                break;
            }
            currentController = dvc;
        }