UIImagePickerController showing image in white?

Luis_ingsis27Luis_ingsis27 MXMember ✭✭

public static void SelectPicture(UIViewController parent, Action callback, UIButton ShowButton = null, UIView vi = null)
{

        try
        {

            Init();
            picker.SourceType = UIImagePickerControllerSourceType.PhotoLibrary;
            picker.MediaTypes = UIImagePickerController.AvailableMediaTypes(UIImagePickerControllerSourceType.PhotoLibrary);
            _callback = callback;
            picker.ModalPresentationStyle = UIModalPresentationStyle.Popover;

            UIPopoverPresentationController presentationPopover = picker.PopoverPresentationController;
            if (presentationPopover != null)
            {
                presentationPopover.SourceView = parent.View;
                presentationPopover.PermittedArrowDirections = UIPopoverArrowDirection.Up;
                presentationPopover.SourceRect = new CoreGraphics.CGRect(18, 312, UIScreen.MainScreen.Bounds.Size.Width, 44);// ShowButton.Frame;
            }
            parent.PresentViewController(picker, true, null);

        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.Message);
        }

    }

Answers

Sign In or Register to comment.