iPhone SDK 中的弹出菜单?
我正在设计一个基于选项卡的应用程序,我希望当用户点击其中一个选项卡时弹出一个菜单。就像在 WaveSense 糖尿病管理器应用程序中一样(我会发布图片,但我是新用户,所以不允许这样做。如果您想查看它,可以免费下载;它有一个很酷的设计,您可以使用一些想法)。
点击选项卡栏图标会弹出一个小弹出菜单,而不是切换 UIViewController。我到处都看过,但不知道如何制作这样的东西。我猜必须对 UITabBarController 进行修改?弹出菜单是自定义的UIView吗?请帮忙!
谢谢!
I'm designing a tab-based app, and I want a menu to pop up from one of the tabs when the user taps it. Like in the WaveSense Diabetes Manager app (I would post pictures, but I'm a new user and SO won't allow it. It's a free download if you would like to check it out; it has a cool design that you can take some ideas from).
Tapping a tab bar icon brings up a little pop-up menu, as opposed to switching the UIViewController. I've looked everywhere and have no idea how make something like this. I'm guessing modifications have to be made to the UITabBarController? Is the pop-up menu a custom UIView? Please help!
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
标签栏委托有一个方法
tabBar:didSelectItem:
。您可以在那时渲染您的菜单,如果您愿意的话,可以从 tabBar 将其动画化。就创建菜单而言,包含 UITableView 的 UIView 效果会很好。如果您愿意,您可以使视图小于设备屏幕的宽度,以获得向上滑动的菜单效果。它还允许您拥有比屏幕上适合的更多菜单条目。
The tab bar delegate has a method
tabBar:didSelectItem:
. You could render your menu at that time, animating it up from the tabBar if you wanted.As far as creating the menu, a UIView with a UITableView contained in it would work great. You can make the view smaller than the width of the device screen if you like, to get the effect of it being a menu which slides up. It would also allow you to have more menu entries than would comfortably fit on the screen.