Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix share extension navigation bar being transparent #19700

Merged
merged 5 commits into from
Dec 2, 2022
Prev Previous commit
Next Next commit
Use .overCurrentContext to present both Share and Save to Draft
Using `.overFullScreen` or leaving `.automatic` resulted in Share being
dismissable via swipe but that didn't restore Safari to the share menu,
leaving it instead blocked as if the presented VC was still there.

`.overCurrentContext` has no effect on the Save to Draft behavior,
leaving it the same as when using `.overFullScreen`.

On iPad, this setting result in both extensions not being full screen.
Otherwise, Share would have been full screen while Save to Draft
wouldn't.
  • Loading branch information
mokagio committed Dec 1, 2022
commit 29cd6274eb67a86441fdc6091a78779cd1e8db6e
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,8 @@ private extension MainShareViewController {

let shareNavController = UINavigationController(rootViewController: editorController)

if editorController.originatingExtension == .saveToDraft {
// We need to make sure we don't end up with stacked modal view controllers by using this:
shareNavController.modalPresentationStyle = .overFullScreen
}
// We need to make sure we don't end up with stacked modal view controllers by using this:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 notice the removal of the double space between "We" and "need" 🤓

shareNavController.modalPresentationStyle = .overCurrentContext

present(shareNavController, animated: true)
}
Expand Down