Mutawe
Mutawe

Reputation: 6524

How to make a button displaying a drop down menu?

I am new at iPhone development using xcode 3.2.6 and I am wondering how I can create a button in the navigation bar which will display a drop down list containing a list which I will program to do things. How to do that?

Upvotes: 2

Views: 3419

Answers (1)

mstottrop
mstottrop

Reputation: 589

First of all, you need a UINavigationController, which will give you the UINavigationbar. In your .m file, you can set a button.

self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(dropDown:)];

then you add a method to handle the touch.

- (void) dropDown: (id) sender;

Edit

KSPopoverView TSPopover are some open-source Popovers.

Upvotes: 5

Related Questions