开发者

Displaying consecutive alert sheets

开发者 https://www.devze.com 2023-01-31 06:53 出处:网络
I have a alert sheet which contains a delete button. On tap of delete I am showing another alert sheet asking for confirmation for deletion. Is this correct? Should I replace second action sheet with

I have a alert sheet which contains a delete button. On tap of delete I am showing another alert sheet asking for confirmation for deletion. Is this correct? Should I replace second action sheet with alert view?

Also, In general, is it good to show two开发者_运维知识库 alert sheets one after the other?


In general, no it's not a good idea to show 2 consecutive ActionSheets. Displaying an AlertView after the ActionSheet is acceptable though, so yes, you should replace the 2nd ActionSheet with an AlertView. Do not forget to implement the AlertView Delegates though.


Generally, a user takes an action to cause the action sheet to appear. If the action sheet's only options are Delete and Cancel, and the user clicked a button whose obvious function is to delete something, then you don't need to show another sheet.

On the other hand, if the user clicked a generic button whose action is not obviously to delete something, or if the action sheet contains other options, you should show an alert view (not an action sheet) to confirm the deletion if they cannot easily undo the delete.


It's technically possible to have two consecutive UIActionSheetViews, but I can't tell you if it goes against any interface guidelines from Apple.

0

精彩评论

暂无评论...
验证码 换一张
取 消