Merge pull request #1933 from michalsrutek/bugfix/ipad-crash-present-inappbrowser
💥 Fix iPad crash due to missing `sourceView`
This commit is contained in:
commit
5b422511c0
|
@ -115,6 +115,14 @@ public class InAppBrowserManager: ChannelDelegate {
|
|||
return
|
||||
}
|
||||
|
||||
if let popover = navController.popoverPresentationController {
|
||||
let sourceView = visibleViewController.view ?? UIView()
|
||||
|
||||
popover.sourceRect = CGRect(x: sourceView.bounds.midX, y: sourceView.bounds.midY, width: 0, height: 0)
|
||||
popover.permittedArrowDirections = []
|
||||
popover.sourceView = sourceView
|
||||
}
|
||||
|
||||
visibleViewController.present(navController, animated: animated)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue