MvxImagePickerTask does not work on ios

0

I have this code to capture an image in xamarin ios, but it does not do anything.

    private void DoTakePicture()
    {
        try
        {
            _pictureChooserTask.TakePicture(400, 95, OnPicture, () => { });
        }
        catch (Exception ex)
        {
            _dialogService.ShowToast(ex.Message);
        }


    }

the output is MvxImagePickerTask called when task already active I have the permissions added. Can someone know what's going on?

Thank you.

    
asked by paloma 30.03.2017 в 19:04
source

1 answer

0

I found this solution in StackOverflow (in English)

Apparently you have to overwrite the PresentModalViewController in your customized presenter:

    public override bool PresentModalViewController(MonoTouch.UIKit.UIViewController viewController, bool animated)
{
    var currentViewController = _flyOutNavigationController.ViewControllers[_flyOutNavigationController.SelectedIndex] as UINavigationController;
    currentViewController.PresentViewController(viewController, true, null);
    return true;
}
    
answered by 31.03.2017 в 12:49