Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gallery is not showing in full height #460

Open
Zwei-wei opened this issue Jul 22, 2020 · 9 comments
Open

Gallery is not showing in full height #460

Zwei-wei opened this issue Jul 22, 2020 · 9 comments

Comments

@Zwei-wei
Copy link

I am a developer integrating this IMG picker to our apps. While testing on my iPhone 11, the gallery is not showing in full height. It looks like the gallery is hidden behind the bottom container. I will paste my code here.

extension FloorPlanViewController: ImagePickerDelegate {
    func wrapperDidPress(_ imagePicker: ImagePickerController, images: [UIImage]) {
        self.imagePickerController?.expandGalleryView()
    }
    
    func doneButtonDidPress(_ imagePicker: ImagePickerController, images: [UIImage]) {
        for image in images {
            self.currentPhotoUploader?.addImage(image: image)
        }
        self.currentPhotoUploader = nil
        self.imagePickerController?.resetAssets()
        self.imagePickerController?.dismiss(animated: true, completion: nil)
    }
    
    func cancelButtonDidPress(_ imagePicker: ImagePickerController) {
        self.imagePickerController?.dismiss(animated: true, completion: nil)
    }
}
private func initImagePicker() {
        let configuration = Configuration()
        configuration.recordLocation = false
        configuration.collapseCollectionViewWhileShot = true
        imagePickerController = ImagePickerController(configuration: configuration)
        imagePickerController?.delegate = self
}
@Zwei-wei
Copy link
Author

I am using the newest Xcode + iPhone 11 with the newest system by the way~

@Zheng-Shuo
Copy link

I got the same issue

@jacobsapps
Copy link

Same here, wasn't sure if it was a SwiftUI issue or not

@Zwei-wei
Copy link
Author

Zwei-wei commented Sep 4, 2020

Same here, wasn't sure if it was a SwiftUI issue or not

Definitely not SwiftUI, I am not using SwiftUI in the current project

@3lvis
Copy link
Collaborator

3lvis commented Oct 4, 2020

Hi this project is in maintenance mode and no further work has been planned, I'm happy to assist if someone wants to look into fixing this issue. Thanks!

@Zwei-wei
Copy link
Author

@jacobsapps @Zheng-Shuo @3lvis I have found the reason why it works like this. Because I am using IOS 13.0+ so by default if you do this present(imagePickerController, animated: true, completion: nil) it will be presented as a slidable modal which might be the reason why the Gallery part of the ImagePick is not showing in full height. So It is easy to avoid if you add imagePickerController?.modalPresentationStyle = .fullScreen before you present the ImagePicker. I still consider it as a bug, cause I thought it should be working in this scenario.

@3lvis
Copy link
Collaborator

3lvis commented Oct 10, 2020

Hi @Zwei-wei I thought I had fixed this. Let me double check.

@Zwei-wei
Copy link
Author

@3lvis I tried the newest version through pod update, if I switch back to default not using .fullScreen, the bottom Galley can still only show like half of the image.

@xinyu-DGS
Copy link

it's easy to fix, just in ImagePickerController.swift:
var totalSize: CGSize { return UIScreen.main.bounds.size }
=>
var totalSize: CGSize { return self.view.bounds.size }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants