问题描述
我需要在Tab Bar控制器上方显示操作表。我的意思是,即使行动表视图处于可见模式,我也能看到标签栏控制器。
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, Please suggest how to view from above the Tab Bar controller. Is it possible.
其次,如何更改操作表的背景颜色并取消按钮返回底色。
secondly, How to change the back ground color of action sheet and cancel button back ground colour.
请帮帮我
谢谢你,
Madan Mohan。
Thank You,Madan Mohan.
推荐答案
要从标签栏显示操作表,您可以在显示它的视图控制器中调用以下内容:
[actionSheet showFromTabBar:self.tabBarController.tabBar] ;
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.
这篇关于如何从Tab Bar Controller上方显示UIActionSheet视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!