you might:

* change the buttons programmatically every time.

* drag 2 UIBarButtonItems in your InterfaceBuilder file, set the connections and the captions in IB. Then in XCode, you can change the buttons by using

NSArray * topLevelObjs = nil;
topLevelObjs = [[NSbundle mainBndle] loadNibName@"yourNibFile" owner:"nameOfNIBFilesOwner" options: nil]; UIBarButtonItem * barButton1 = (UIBarButtonItem *)[topLevelObjs objectAtIndex: indexNumber];

you could build in some error checking, like checking the class and the tag of the UIBarButtonItem.

Feel free to comment on this!

Op 6-aug-2009, om 7:47 heeft Agha Khan het volgende geschreven:

Hi:
I have a UINavigationBar where I would like to place 2 buttons. I was looking UINavigationBar.h for its implementation and didn't see the way we could add more than 2 buttons(Right hand side and left hand siderightBarButtonItem ) but my both buttons are rightBarButtonsItems where one of them is always hidden. I need 2 buttons because they point to 2 different click functions and different captions.


You might have better idea?

Best regards
Agha_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/cocoa-dev% 40yaranga.nl

This email sent to [email protected]

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to