如何在 UIDocumentPickerViewController 中更新框架大小的样式

How to update the the style for frame size in UIDocumentPickerViewController

在我的应用程序中,我的 UIDocumentPickerViewController 的框架大小始终全屏,如下图和以下代码。但是,我发现 UIDocumentPickerViewController 的帧大小不同,但我不知道如何获得第二张图片的效果。有谁知道怎么弄出来的效果吗?

https://drive.google.com/file/d/1_q_kfIIYA0d0KcT7NyPpFb6Q1vymU-lb/view?usp=sharing

- (void)btnPressDown {
    NSLog(@"Press Down QQ");
     [self showDocumentPickerInMode:UIDocumentPickerModeImport];
}
- (void)showDocumentPickerInMode:(UIDocumentPickerMode)mode {
    NSLog(@"showDocumentPickerInMode QQ");
    UIDocumentPickerViewController *picker = [[UIDocumentPickerViewController alloc]     initWithDocumentTypes:@[@"public.data"] inMode:mode];
    picker.delegate = self;

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

https://drive.google.com/file/d/177W-O0eJmePhLfS8ifGlw9n3jj26FDn9/view?usp=sharing

您需要设置演示文稿样式。呈现样式决定了模态呈现的视图控制器如何在屏幕上显示。 "picker.modalPresentationStyle = UIModalPresentationFormSheet;"

- (void)showDocumentPickerInMode:(UIDocumentPickerMode)mode {
    UIDocumentPickerViewController *picker = [[UIDocumentPickerViewController alloc]     initWithDocumentTypes:@[@"public.data"] inMode:mode];
    picker.modalPresentationStyle = UIModalPresentationFormSheet;
    picker.delegate = self;
    [self presentViewController:picker animated:YES completion:nil];
}

就是这样:)