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

Evaluate support to popover ActionSheet on iPad #309

Open
lechuckcaptain opened this issue May 13, 2020 · 3 comments
Open

Evaluate support to popover ActionSheet on iPad #309

lechuckcaptain opened this issue May 13, 2020 · 3 comments

Comments

@lechuckcaptain
Copy link

Following Apple guidelines an ActionSheet should be displayed as a popover anchored to the UI item who generated it.

On iPad, UIKit requires that you display an action sheet inside a popover. Figure 2 shows an action sheet anchored to a bar button item.

More info here: https://developer.apple.com/documentation/uikit/windows_and_screens/getting_the_user_s_attention_with_alerts_and_action_sheets

See screenshot:
image

@sberrevoets
Copy link
Owner

I wish we could do that, but last I checked this wasn't (fully) possible without using some private API. I don't recall the details, but the README cautions against this as well:

This is because iOS doesn't support UIModalPresentationStyle.Custom for adaptive presentations (such as when presenting an action sheet from a bar button item).

@lechuckcaptain
Copy link
Author

Thank you for the explanation, I didn't get from the README the actual problem. To be honest I prefer the behavior of your library instead of the Apple guidelines, but since the library mimic the standard UIAlertController, I thought it was worth to track the issue.

last I checked this wasn't (fully) possible without using some private API

Do you have a branch where it's possible to see your last experiments on the topic?

@sberrevoets
Copy link
Owner

Apologies for the late response. I don't have a branch that demonstrates the problem as this was a couple of years ago when I first added action sheet support, and enough has changed in those years that it might be possible now.

If you're still interested in this, feel free to submit a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants