fix(ios): present share sheet from topmost controller - #7
Conversation
|
@codex please review this PR |
1 similar comment
|
@codex please review this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f44d432581
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if let tabBarController = viewController as? UITabBarController, | ||
| let selectedViewController = tabBarController.selectedViewController | ||
| { | ||
| viewController.present(activityViewController, animated: true) | ||
| return topMostViewController(startingAt: selectedViewController) |
There was a problem hiding this comment.
Check presented modals before selected tab
When the root controller is a UITabBarController that is itself presenting a sheet containing this text view, this returns the selected tab instead of following tabBarController.presentedViewController. In that scenario the share action is no longer presented from the actual topmost controller, so UIKit can present behind/fail over the active sheet; recurse into presentedViewController before unwrapping tab/navigation containers.
Useful? React with 👍 / 👎.
|
@codex please fix the issues you found with this PR - review the comments |
|
Summary
Testing
|
Cherry-picked from gonzalezreal/textual PR gonzalezreal#41