thiagoperes / IDMPhotoBrowser

Photo Browser / Viewer inspired by Facebook's and Tweetbot's with ARC support, swipe-to-dismiss, image progress and more
MIT License
2.71k stars 641 forks source link

iPhone X support #271

Open getaaron opened 6 years ago

getaaron commented 6 years ago

When presenting the IDMPhotoBrowser, the "Done" button is obscured by the sensor housing notch:

image

The top half of the "Done" button doesn't respond to touch events.

PrakashMaharjan commented 6 years ago

I just checked if the device is iphone X or not set the top inset of done button as shown below:

browser.doneButtonTopInset = 50.0f;

This will shift the done button little below.

screen shot 2017-10-03 at 11 16 06 am
getaaron commented 6 years ago

@PrakashMaharjan Right, but ideally the IDMPhotoBrowser would respect the safe insets property

getaaron commented 6 years ago

I went with this for now…

if (@available(iOS 11.0, *)) {
    browser.doneButtonTopInset = MAX(browser.doneButtonTopInset, viewController.view.safeAreaInsets.top);
}

A more robust improvement that used the auto-layout constraints would be preferred.

chris-hut commented 6 years ago

Isn't this closed by https://github.com/thiagoperes/IDMPhotoBrowser/pull/282

SDGMazeGeek commented 6 years ago

is this solved yet?