Re: Two right buttons on UINavigationBar?
Re: Two right buttons on UINavigationBar?
- Subject: Re: Two right buttons on UINavigationBar?
- From: Agha Khan <email@hidden>
- Date: Fri, 07 Aug 2009 10:57:48 -0700
It looks like it is a bug.
Someone else have same problem.
http://blog.7touchgroup.com/2009/08/uinavigationitem-sethidesbackbuttonyes-won
’t-prevent-from-goingback/
I would like to change the action of the Done button.
As you see in UINavigationBar.h (line 62)
it has only 2 items (topItem and backItem). They have readonly flag.
I can't touch them.
UIBarButtonItem *buttonItem = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self
action:@selector(toggleHelpGame)];
UINavigationItem *navigationItem = [[UINavigationItem alloc]
initWithTitle:@"Help"];
navigationItem.rightBarButtonItem = buttonItem;
[navigationItem setLeftBarButtonItem:nil];
[self.sideNavigationBarCtrl pushNavigationItem:navigationItem
animated:NO];
[navigationItem release];
[buttonItem release];
It works fine, but show previous Button as well. I was unable to get
rid of that button.
In a reality we created a new UIBarButtonItem inside bar control, but
never changed the previous attribute of Done button.
I have a work around to create another bar and hide the previous bar.
Any help will be very much appreciated.
Best regards
Agha
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden