如何在iOS中使用弹出菜单? [英] How to use a pop-up menu in iOS?
问题描述
当我单击导航栏中的加号图标(看起来像我所附的图片)时,我想使用一个弹出菜单。
I want to use a pop-up menu when I click on a plus icon in the navigation bar that looks like the pic I attached. Can you please instruct me how can I accomplish that?
感谢一堆!
感谢帮助人员,我得到了答案,如果有人在这里寻找到Apple文档的直接链接,则为: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/UIKitUICatalog/UIActionSheet.html#//apple_ref/doc/ uid / TP40012857-UIActionSheet
Thanks for the help guys, I got my answer, and if someone is looking for a direct link to the apple documentation here it is: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/UIKitUICatalog/UIActionSheet.html#//apple_ref/doc/uid/TP40012857-UIActionSheet
推荐答案
正如rdelmar所说,这是一个UIActionSheet。 @rdelmar,您应该将其发布为答案,以便OP可以接受它。
As rdelmar says, that's a UIActionSheet. @rdelmar, you should post that as an answer so the OP can accept it.
您将添加从自定义视图(按钮)构建的UIBarButtonItem并将操作附加到该按钮调用并显示UIActionSheet。
You would add a UIBarButtonItem built from a custom view (a button) and attach an action to the button that invokes and displays a UIActionSheet.
这是非常老的线程。 UIActionSheet已经过时了多年,现在正确的解决方案是使用UIAlertController的操作表外观
This is VERY old thread. UIActionSheet has been deprecated for years, and the right solution now is to use the action sheet appearance of a UIAlertController
这篇关于如何在iOS中使用弹出菜单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!