Hello, all ...

I've a question about the UINavigationController backBarButtonItem property. I 
wanted to merely set my own image for the back button, instead of it using the 
title of the controller above in the hierarchy.  So, this is what I did (yes 
this app is using Three20, but I don't think that's the reason):

- (id)initWithNavigatorURL:(NSURL *)URL query:(NSDictionary *)query 
{
        if (self = [super initWithNavigatorURL:URL query:query]) 
        {
                self.navigationItem.backBarButtonItem = [[[UIBarButtonItem 
alloc] initWithImage:[UIImage imageNamed:@"backarrow.png"]   
style:UIBarButtonItemStylePlain target:self action:@selector(back)] 
autorelease];
        }

        return self;
}

- (void)back:(id)sender
{
}

Now, this worked -- but I wasn't _expecting_ it to work. I was expecting that 
my "back" selector would be called, and I would have to tell the nav controller 
to pop. However, my "back" selector isn't called, and the back button _works_ 
like it always has. While i'm not in any way against freebees like this, i'm a 
bit concerned as to _why_ it works like this.  Any explanation would be 
appreciated, explanations that actually edify me more so :-)

Regards,

John


_______________________________________________

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