UIDocumentMenuViewController more button

483 views Asked by At

I have the code below in my app and when I click the "More" button, the dropbox option is displayed and disappear quickly, not allowing to enable.

UIDocumentMenuViewController *picker = [[UIDocumentMenuViewController alloc]
                                            initWithDocumentTypes:@[(NSString *)kUTTypeImage]
                                            inMode:UIDocumentPickerModeImport];
    [picker addOptionWithTitle:@"Rolo de Câmera" image:[UIImage imageNamed:@"ic_photo_library"] order:0 handler:^{

    }];
    [picker addOptionWithTitle:@"Tirar Foto" image:[UIImage imageNamed:@"ic_photo_camera"] order:0 handler:^{

    }];
    picker.delegate = self;
    [self presentViewController:picker animated:YES completion:nil];

Result:

DocumentPicker Bug

Any suggestion?

1

There are 1 answers

2
Giorgio On

The problem is with isTranslucent property of UINavigationBar. I faced the same problem and I solved by removing this line in my didFinishLaunchingWithOptions method

UINavigationBar.appearance().isTranslucent = false