• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[iPhone 3.1] navigationItem.backBarButtonItem weirdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iPhone 3.1] navigationItem.backBarButtonItem weirdness


  • Subject: [iPhone 3.1] navigationItem.backBarButtonItem weirdness
  • From: John Michael Zorko <email@hidden>
  • Date: Wed, 10 Feb 2010 16:10:49 -0800

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

  • Follow-Ups:
    • Re: [iPhone 3.1] navigationItem.backBarButtonItem weirdness
      • From: Roland King <email@hidden>
    • Re: [iPhone 3.1] navigationItem.backBarButtonItem weirdness
      • From: Peter Blazejewicz <email@hidden>
  • Prev by Date: Re: Using NSKeyedArchiver to save and restore state on iPhone apps
  • Next by Date: Re: [iPhone 3.1] navigationItem.backBarButtonItem weirdness
  • Previous by thread: Re: NSArray (unique Items matching x)
  • Next by thread: Re: [iPhone 3.1] navigationItem.backBarButtonItem weirdness
  • Index(es):
    • Date
    • Thread