简体   繁体   中英

Pop-up Menu in iPhone SDK?

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM