Allow developers to show the status bar with navigation bar buttons without overlaps.
If gallery is showed with visible status bar the navigation buttons overlaps it, with this small change you can set to move content origin under status bar to prevent it.
Before:
After:
Code:
private class PhotosViewController: NYTPhotosViewController {
override var prefersStatusBarHidden: Bool {
return false
}
override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}
}
let viewer = PhotosViewController(photos: [photo], initialPhoto: photo, delegate: nil)
viewer.underStatusBar = true
self.present(viewer, animated: true, completion: nil)
contents of #221, plus a couple tweaks.
cc @sergiog90
Original PR contents: