Skip to content

Commit

Permalink
Fix issue for fullscreen not animated navigation on iOS 18 (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
MacTHEgenius authored Aug 23, 2024
1 parent b513f95 commit 25bdabc
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions navigation/ios/FullScreenNotAnimatedPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ struct FullScreenNotAnimatedPresenter<Content: View>: UIViewRepresentable {
controller.view.backgroundColor = .clear
controller.modalPresentationStyle = .overFullScreen

guard let presenting = view.owningController else {
guard let presenting = view.nextViewController else {
resetItemBinding()
return
}
Expand Down Expand Up @@ -88,14 +88,12 @@ struct FullScreenNotAnimatedPresenter<Content: View>: UIViewRepresentable {
}
}

extension UIView {
var owningController: UIViewController? {
if let responder = next as? UIViewController {
return responder
} else if let responder = next as? UIView {
return responder.owningController
extension UIResponder {
var nextViewController: UIViewController? {
if let viewControllerResponder = self as? UIViewController {
viewControllerResponder
} else {
return nil
next?.nextViewController
}
}
}

0 comments on commit 25bdabc

Please sign in to comment.