How to display the UIActionSheet view from above Tab Bar Controller?

后端 未结 1 719
梦毁少年i
梦毁少年i 2021-02-20 14:39

I need to display the action sheet above the Tab Bar controller. I mean, I would be able to see the Tab Bar controller even the action sheet view is in visible mode.

So,

相关标签:
1条回答
  • 2021-02-20 14:53

    To display an action sheet from a tab bar, you can call the following within the view controller that is presenting it: [actionSheet showFromTabBar:self.tabBarController.tabBar];

    Note that the references explicitly state that action sheets cannot be styled. Nor is there anyway that I know of to make an action sheet appear on top of a tab bar. If you wish to step around the established interface guidelines in the manner you stated, you will probably have to create a custom view.

    edit: The reason that the action sheet normally obscures the tab bar is that it is intended to be modal: either the user chooses an action, or they cancel. Either way, they shouldn't navigate away before making the choice, which your desired layout would imply.

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