Reputation: 6524
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
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;
KSPopoverView TSPopover are some open-source Popovers.
Upvotes: 5