单击 UIBarButtonItem 时 iPhone 中的弹出窗口
我想在用户单击 UIBarButtonItem
时显示弹出窗口。为了让弹出窗口在 iPhone 上工作,我搜索并找到了 WEPopover
已编辑 : 抱歉,我的问题很混乱。我试图画一些类似于 iPad 弹出框的东西,但是是在 iPhone 上。我问是否有替代方案,例如在其他视图上添加 UIView 或从 iPhone SDK 中添加新组件。
谢谢。
I would like to show a popover when the user clicks on a UIBarButtonItem
. To make a popover work on an iPhone, I have searched and found WEPopover
Edited : Sorry, my question was confusing. I was trying to draw something similar to the iPad popover, but in an iPhone. I was asking if there is an alternative to it, such as adding a UIView over the other views or a new component from the iPhone SDK.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看一下 FPPopover
代码真的很简单,有很多自动的东西
Take a look at FPPopover
The code is really simple and has a lot of automatic things
将目标添加到您的 UIBarButtonItem 中
,并在您的目标中执行如下操作:
此代码改编自 WEPopover https://github.com/werner77/WEPopover/blob/master/Classes/WEPopoverViewController.m
add a target to your UIBarButtonItem
and in your target do something like this:
this code was adapted from the sample provided with WEPopover https://github.com/werner77/WEPopover/blob/master/Classes/WEPopoverViewController.m