Krisiacik / ImageViewer

An image viewer à la Twitter
MIT License
2.54k stars 388 forks source link

[BUG] Video controls under safe zone on new iPhones #248

Open Ludotrico opened 3 years ago

Ludotrico commented 3 years ago

Devices that do not have home buttons instead have a greater safe zone at the bottom of the screen. When playing a video, this safe zone is ignored and the video controls are too low to interact with.

Here is a picture of the issue.

ionut-lucaci commented 3 years ago

I am also experiencing this

Ludotrico commented 3 years ago

Please let me know if you have seen this @kellyroach @jfahrenkrug @woko666 @RuiAAPeres

hanawat commented 2 years ago

I've found a temporary workaround. footerView avoids safe area, so you just need to add a dummy view.

The default layout has a 25pt margin at the bottom. https://github.com/Krisiacik/ImageViewer/blob/6.0.0/ImageViewer/Source/GalleryViewController.swift#L45 If you don't need it, set the footerViewLayout to 0.

let viewController = GalleryViewController(
  startIndex: index,
  itemsDataSource: datSource,
  configuration: [.footerViewLayout(.center(.zero))]
)
viewController.footerView = .init()
presentImageGallery(viewController)