Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/bradykzg-fix-ipad-air-crash'
Browse files Browse the repository at this point in the history
  • Loading branch information
tilltue committed Oct 11, 2021
2 parents 14ea8ce + 0c4404e commit 05df338
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,14 @@ extension TLPhotosPickerViewController: UIImagePickerControllerDelegate, UINavig
picker.mediaTypes = mediaTypes
picker.allowsEditing = false
picker.delegate = self

// if user is on ipad using split view controller, present picker as popover
if UIDevice.current.userInterfaceIdiom == .pad {
picker.modalPresentationStyle = .popover
picker.popoverPresentationController?.sourceView = view
picker.popoverPresentationController?.sourceRect = .zero
}

self.present(picker, animated: true, completion: nil)
}

Expand Down

0 comments on commit 05df338

Please sign in to comment.