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 (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to