roycornelissen/GMImagePicker.Xamarin

Picker auto scroll to bottom when selecting images

Closed this issue · 0 comments

I have implemented the picker in iOS for multiple selection. When scrolling up to select older images the picker will snap the scroll to the bottom after a few second while scrolling to select older images. Below is how I am implementing the picker:

        mediaPickTcs = new TaskCompletionSource<IList<MediaFile>>();
        currentPicker = new GMImagePickerController() {
            Title = title,
            MediaTypes = new[] { type },
            
        };

        currentPicker.FinishedPickingAssets += FinishedPickingAssets;

        var window = UIApplication.SharedApplication.KeyWindow;
        var vc = window.RootViewController;
        while (vc.PresentedViewController != null) {
            vc = vc.PresentedViewController;
        }

        await vc.PresentViewControllerAsync(currentPicker, true);

        var results = await mediaPickTcs.Task;

        currentPicker.FinishedPickingAssets -= FinishedPickingAssets;
        OnMediaPickedCompleted?.Invoke(this, results);

If anyone else is experiencing or have a fix please help.

Thank you!