Re: [iPhone 3.1] navigationItem.backBarButtonItem weirdness
Re: [iPhone 3.1] navigationItem.backBarButtonItem weirdness
- Subject: Re: [iPhone 3.1] navigationItem.backBarButtonItem weirdness
- From: Peter Blazejewicz <email@hidden>
- Date: Thu, 11 Feb 2010 01:16:54 +0100
Hi John,
your selector is missing colon:
@selector(back:)
for method:
-(IBAction)back:(id)sender
hth,
regards,
Peter Blazejewicz
On Thu, Feb 11, 2010 at 1:10 AM, John Michael Zorko <email@hidden> wrote:
>
> 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 (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
>
_______________________________________________
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