Better way to select multiple photos from gallery in Android and iOS

Hi, i'm trying to find a solution to select multiples photos in Xamarin in both platforms, can be two separated nugets or something like that.
I tried GmImagePicker, but it simply don't open the images selector view controller, i followed the GitHub tutorial.
Something i can use? Thanks.

Best Answer


  • WagnerMatteiWagnerMattei Member ✭✭

    Can you explain what the ShowViewController(picker, null); means, is a not implemented function, or it cames from GMImagePicker, i dont understand what it is

  • WagnerMatteiWagnerMattei Member ✭✭

    Damn i got it, this ShowViewController(picker, null); is from the active UIViewController . If anyone needs help you can create a function like that

    public UIViewController GetVisibleViewController() {
    var rootController = UIApplication.SharedApplication.KeyWindow.RootViewController;

            if (rootController.PresentedViewController == null)
                return rootController;
            if (rootController.PresentedViewController is UINavigationController)
                return ((UINavigationController)rootController.PresentedViewController).TopViewController;
            if (rootController.PresentedViewController is UITabBarController)
                return ((UITabBarController)rootController.PresentedViewController).SelectedViewController;
            return rootController.PresentedViewController;

    And then call await GetVisibleViewController().PresentViewControllerAsync(picker, false);

Sign In or Register to comment.