Skip to content

Commit

Permalink
292: Fix popover for new iPhones iPhone XR & iPhone X Max
Browse files Browse the repository at this point in the history
  Using the iOS 8.3 API:
   optional func adaptivePresentationStyle(for controller: UIPresentationController,
                        traitCollection: UITraitCollection) -> UIModalPresentationStyle
  • Loading branch information
mohamede1945 committed Sep 30, 2018
1 parent 2dee07a commit 6b2102c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Quran/PhonePopoverPresentationControllerDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// GNU General Public License for more details.
//
class PhonePopoverPresentationControllerDelegate: NSObject, UIPopoverPresentationControllerDelegate {
func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle {
func adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: UITraitCollection) -> UIModalPresentationStyle {
return .none
}
}
2 changes: 1 addition & 1 deletion Quran/QariTableViewControllerCreator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class QariTableViewControllerCreator: NSObject, Creator, UIPopoverPresentationCo
return controller
}

func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle {
func adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: UITraitCollection) -> UIModalPresentationStyle {
return .fullScreen
}

Expand Down
2 changes: 1 addition & 1 deletion Quran/QuranViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class QuranViewController: BaseViewController, AudioBannerViewPresenterDelegate,
present(controller, animated: true, completion: nil)
}

func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle {
func adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: UITraitCollection) -> UIModalPresentationStyle {
return .none
}

Expand Down

0 comments on commit 6b2102c

Please sign in to comment.