openfoodfacts / openfoodfacts-ios

Native (Swift) version of Open Food Facts for iOS. Coders & Decoders welcome đŸ€łđŸ„« 😊
https://ios.openfoodfacts.org
Apache License 2.0
361 stars 160 forks source link

Unresponsive view after ingredient cropping in Edit Mode #432

Closed teolemon closed 4 years ago

teolemon commented 4 years ago

When editing a product, after I crop the image of ingredients, the sheet becomes unresponsive and I get kicked out of this view. After that, when I go back into editing mode, the NutriScore is still there but the nutrients that I just had added, are empty Max B.

image

teolemon commented 4 years ago

Max Bredow 3 hours ago The only major thing I came across was adding a photo of the ingredients. This cropping tool somehow crashes the app

Pierre Slamich 3 hours ago what happens if you don’t crop ?

If I don’t crop it’s fine If I add a pic when having scanned the item it’s fine But when finding the item (eg through the history) and then deciding to edit and crop, it crashes

philippeauriach commented 4 years ago

I do get to “reproduce” a problem : history > product > edit > “photo of the ingredients” > take picture > crop > validate > app is stuck in a weird UI state (see below screenshot)

It seems a corresponding issue comes from the Crop dependency: https://github.com/TimOliver/TOCropViewController/releases A visual glitch that would occur in iOS 13 because the Swift view controller wasn't explicitly marked as full screen. (#385)

Trying with an update of the lib

IMG_0109 (based on the ui, it seems that the front controller is here but “hidden” or “not displayed”)

philippeauriach commented 4 years ago

Wrong path, updating the dependency did not fix anything.

@teolemon The problem is fixed using navVC.modalPresentationStyle = .fullScreen in SummaryFooterCellController.swift line 61. This is only a workaround as the view is now displayed full screen, not in the new (nice) way of iOS 13.

teolemon commented 4 years ago

thanks a lot for the analysis. @aleene @philippeauriach let's go for the workaround, and submit final to Apple ?

teolemon commented 4 years ago

I works for me on iOS 12. thanks @philippeauriach for the workaround 👌