Action sheet or alert to block user?

I’ve an UIAlertController to allow blocking an user from my app, and another one to report them with a bunch of reasons.
However I can’t decide which UIAlertController.Style to use.
Report action contains a 5 reasons to report, plus the cancel action. If you choose the Other reason, you get a third alert with a text field to fill in the reason. Then there is the block alert with a simple Yes/No choice.
Report alert then/or Block alert both come from UIMenu actions in a navigation bar’s UIBarButtonItem.

Following the Apple human guidelines, I should:

Use an action sheet — not an alert — to offer choices related to an intentional action.

So it seems pretty clear that I should use the action sheet style for the first Report alert, as it’s intentional and contains more than 2 actions.
But then I have to use an alert style if the user uses the Other option and has to write their reason.
And what about the Block alert than comes next in any case or from a dedicated action in the UIMenu?

To sum up:

  • UIBarButtonItem -> UIMenu -> Report & Block UIActions -> 5 Report reasons / Yes or No for Block
  • Block handler can be independent, but it is also called if any report reason is selected
  • If Other report reason is selected, an alert with text field is initially shown to specify the reason

I’m confused, which style should I use for all 3 of them?

  • Here is the full workflow: https://imgur.com/a/Z47rARa

Add a Comment

Replies

I'm also a bit confused on what you want to achieve.

Please explain in sequence what should occur and give a specific name to each alert so that we can understand what we are speaking about.

For some reason, you need to block user

  • --> What do you show exactly at this stage ?

How do you go to the Report alert ? By user choice ? Automatically ?

  • --> explain precisely what triggers the Report Alert
  • --> What choices or user actions here

Third alert is triggered if select "Other" button ?

  • Where is the UIMenu ?
  • My bad @Claude31, I updated my post

  • It's better, but would be even better with explicit info. Which is First report in your sum up ? Which are its actions ? What is Block alert ? etc…

  • @Claude31 "First" meant "the first UIAlertController to show up, nothing more. It's the Report alert with the 5 reasons I mention. Its actions are: 4 report reasons, 1 "other" reason (which opens the alert with textfield) and the cancel button. Each reason of reporting also calls the handler launching the Block alert which asks to block the reported user or not.Finally, even if the alert asking yes or no for blocking is launched is called if you choose to report the user, you can also individually launch it, as the report alert, from the UIMenu in the UIBarButtonItem in the UINavigationBar, which has a "Report" action and a "Block" action.

Add a Comment

Thanks, that's clear.

So it seems pretty clear that I should use the action sheet style for the first Report alert, as it’s intentional and contains more than 2 actions. But then I have to use an alert style if the user uses the Other option and has to write their reason.

Yes, Report alert should be action sheet.

Stacking alerts should be avoided.

Have you considered having the textField (to report other) inside this action sheet and allow user interaction with the textField only if user hit other ?

  • Ok for the Report alert.

    "Stacking alerts should be avoided"

    Do you have any source for this? Not that I don't trust you but I haven't seem that anywhere I looked at.

    "Have you considered having the textField (to report other) inside this action sheet and allow user interaction with the textField only if user hit other ?"

    Is this even possible? I've never ever seen that. If so, is it compliant to the guidelines? And how would I do that?Finally, what about the Block alert? Because it doesn't seem consistent to use 1 action sheet among 2 other alerts, does it?

Add a Comment

"Stacking alerts should be avoided"

It's just that as a user, immediately getting a new one alert after handling one is not very pleasant.

"Have you considered having the textField (to report other) inside this action sheet and allow user interaction with the textField only if user hit other ?" Is this even possible?

If I understand the question, yes it is possible. See example here:

https://stackoverflow.com/questions/31922349/how-to-add-textfield-to-uialertcontroller-in-swift

If so, is it compliant to the guidelines? 

I cannot see any reason it would not be.

Showing what the alerts sequence (as screenshots) could help we understand precisely what you want to do.

  • Hi there @Claude31, I posted the workflow in a comment of my original post.

Add a Comment