iOS 14 - Thumbnails do not display in the UIImagePickerController

Viewed 1099

Thumbnails do not display in the UIImagePickerController when running on iPhone 11 or real device with iOS 14.

    UIImagePickerController * picker = [[UIImagePickerController alloc] init];
    picker.delegate=self;
    picker.allowsEditing = YES;
    picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
    [self presentViewController:picker animated:YES completion:nil];

Result:

Photos and Albums showing as Blank but when I tap on-screen image will be selected.

2 Answers

For me, it was caused by using

UIScrollView.appearance(whenContainedInInstancesOf: [UINavigationController.self]).backgroundColor = .backgroundPrimaryNew

I don't know why is that, but after I've removed this line it began working again and thumbnails are showing.

Try this Instead of presenting add UIImagePickerController as subView

UIImagePickerController * picker = [[UIImagePickerController alloc] init];
picker.delegate=self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;

[self.view addSubview:self.picker.view];
[self addChildViewController:self.picker];
[self.picker didMoveToParentViewController:self];
Related