diff --git a/Tusker/Screens/Large Image/LargeImageViewController.swift b/Tusker/Screens/Large Image/LargeImageViewController.swift index e81b7cfd..f5dfa85b 100644 --- a/Tusker/Screens/Large Image/LargeImageViewController.swift +++ b/Tusker/Screens/Large Image/LargeImageViewController.swift @@ -140,9 +140,12 @@ class LargeImageViewController: UIViewController, UIScrollViewDelegate, LargeIma let notchedDeviceTopInsets: [CGFloat] = [ 44, // iPhone X, Xs, Xs Max, 11 Pro, 11 Pro Max 48, // iPhone XR, 11 - 47, // iPhone 12, 12 Pro, 12 Pro Max, 13, 13 Pro, 13 Pro Max + 47, // iPhone 12, 12 Pro, 12 Pro Max, 13, 13 Pro, 13 Pro Max, 14, 14 Plus 50, // iPhone 12 mini, 13 mini ] + let pillDeviceTopInsets: [CGFloat] = [ + 59, // iPhone 14 Pro, 14 Pro Max + ] if notchedDeviceTopInsets.contains(view.safeAreaInsets.top) { // the notch width is not the same for the iPhones 13, // but what we actually want is the same offset from the edges @@ -152,6 +155,11 @@ class LargeImageViewController: UIViewController, UIScrollViewDelegate, LargeIma let offset = (earWidth - shareButton.bounds.width) / 2 shareButtonLeadingConstraint.constant = offset closeButtonTrailingConstraint.constant = offset + } else if pillDeviceTopInsets.contains(view.safeAreaInsets.top) { + shareButtonLeadingConstraint.constant = 24 + shareButtonTopConstraint.constant = 24 + closeButtonTrailingConstraint.constant = 24 + closeButtonTopConstraint.constant = 24 } } diff --git a/Tusker/Screens/Large Image/LargeImageViewController.xib b/Tusker/Screens/Large Image/LargeImageViewController.xib index ed21b4cc..f313f3c5 100644 --- a/Tusker/Screens/Large Image/LargeImageViewController.xib +++ b/Tusker/Screens/Large Image/LargeImageViewController.xib @@ -1,9 +1,9 @@ - + - + @@ -108,7 +108,7 @@ - - + +