hyperoslo / Lightbox

:milky_way: A convenient and easy to use image viewer for your iOS app
https://www.hyper.no
Other
1.62k stars 329 forks source link

InfoLabel squished in left corner when view loads then aligns correctly once view appears #183

Open Marcoc88 opened 6 years ago

Marcoc88 commented 6 years ago

iOS 11.2.6. iPhone 8 and X.

When I call the code below it loads the view but the InfoLabel is squished on the bottom left of the screen and does not align correctly until about half a second after the view appears to the user.

 func presentImage(image: UIImage, info: String) {
    LightboxConfig.hideStatusBar = false
    LightboxConfig.PageIndicator.enabled = false

    let images =   [LightboxImage(
      image: image,
      text: info
    )]
    let lightboxController = LightboxController(images: images)

    lightboxController.dynamicBackground = true

    present(lightboxController, animated: true, completion: nil)
  }
crafterm commented 5 years ago

Also noticing this as well, similar code - info label appears squished, and then lays out correctly after a brief moment

sergstav commented 4 years ago

@3lvis issue still exists. Any solution?

sergstav commented 4 years ago

@Marcoc88 did you find any solution for this?

Marcoc88 commented 4 years ago

@sergstav I don't believe I found a solution.

3lvis commented 4 years ago

Any help would be appreciated

3lvis commented 4 years ago

Does this project works for you on iOS 13? Because I can't seem to get it working.

sergstav commented 4 years ago

Yes, its working.

yspreen commented 4 years ago

13 is working great with carthage.

sergstav commented 4 years ago

Also working with Cocoapods.

3lvis commented 4 years ago

If you run the iOSDemo project and press the "Show me the Lightbox" button this is what it shows. For some reason, it's not showing the Lightbox.

Simulator Screen Shot - iPhone 11 Pro Max - 2020-06-18 at 19 11 51

norbdev commented 4 years ago

@3lvis : This workaround works: https://github.com/hyperoslo/Lightbox/issues/229#issuecomment-523589760

3lvis commented 4 years ago

@norbdev thank you! Got the demo working properly now. Now, looking into reproducing the original bug.

3lvis commented 4 years ago

I found the issue now. I'll make some time to look into it but if you have any clues it would be helpful :)

3lvis commented 3 years ago

Haven't had the opportunity to prioritize this, happy if somebody interested can have a look