Using UIActionSheet on iPad

后端 未结 1 757
无人及你
无人及你 2021-02-18 23:39

Apple\'s documentation for the UIActionSheet is causing me confusion. First off, in the iPad Human Interface Guidelines, it says :

To learn more about usi

相关标签:
1条回答
  • 2021-02-19 00:30

    First of all, UIActionSheet existed before UIPopoverController and UIPopoverController isn't available on iPhone, so it's useful for backwards compatibility and universal apps.

    Also, a UIActionSheet isn't necessarily presented in a popover, specifically, if you show it from a UIBarButtonItem or UIToolbar that is already inside a popover. It is then presented in a similar fashion as on the iPhone (sliding in from the bottom of the view controller). According to the HIG, you must not present multiple popovers at the same time (I once had an app rejected for that), so in cases where a view controller may be inside a popover (like in a standard split view app), you may want to use action sheets, if possible. Of course there are a lot of cases where you can't replace a popover with an action sheet, because an action sheet only shows a list of buttons and a title, whereas a popover can display any view controller.

    I think that the animated parameter only has an effect when an action sheet is presented in the "classic" (as on iPhone) way.

    0 讨论(0)
提交回复
热议问题