• 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
Re: Reacting to UIBarButtonItem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reacting to UIBarButtonItem


  • Subject: Re: Reacting to UIBarButtonItem
  • From: Anthony Smith <email@hidden>
  • Date: Wed, 7 Oct 2009 21:20:48 -0400

Yes, user interaction enabled is set in IB for the nav bar.

On Oct 7, 2009, at 9:04 PM, Luke the Hiesterman wrote:

Make sure that your navBar's userInteractionEnabled property is set to YES.

Luke

On Oct 7, 2009, at 5:58 PM, Anthony Smith wrote:

Hm, both seem to be fine.

- (void)viewDidLoad {
	[super viewDidLoad];

	if (doneButton != nil) {
		NSLog(@"NOT NIL");
	}

	[doneButton setTarget:self];
	[doneButton setAction:@selector(displayShuffleView:)];
}

<Screen shot 2009-10-07 at 8.52.29 PM.png>

NOT NIL is being printed and the connections are for my FileOwner (UIViewController). The UIBarButtonItem is in a UINavigationBar. I'm probably missing something simple here.


On Oct 7, 2009, at 8:49 PM, Luke the Hiesterman wrote:

I'd verify that doneButton != nil. If you created this in a nib, you might have forgotten to wire it up.

Luke

On Oct 7, 2009, at 5:40 PM, Anthony Smith wrote:

Here's what I'm doing.

- (void)displayShuffleView:(id)sender {
	// Whatever here
}

- (void)viewDidLoad {
	[super viewDidLoad];

	[doneButton setTarget:self];
	[doneButton setAction:@selector(displayShuffleView:)];
}

I'm not sure what's up. self is a UIViewController. I put log statements to check for a trigger but nothing is coming through.

On Oct 7, 2009, at 8:32 PM, Luke the Hiesterman wrote:

Target and action is the way to go. There must be an error in doing so, probably a typo in setting the action selector. Remember that colons are part of selector names....

Luke

On Oct 7, 2009, at 5:25 PM, Anthony Smith wrote:

I have a settings pane similar to Weather's settings pane. I have a Done button on the right hand side which needs to trigger a flip animation to get back to the main view. I'm having trouble getting the UIBarButtonItem to trigger. I've tried setting the target and action properties of UIBarButtonItem but that doesn't seem to do anything. Am I required to use a UINavigationController for this scenario? I've read up on navigation controllers in the View Controller Programming Guide but I'm not having much luck. Any input would be appreciated._______________________________________________

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






Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >Reacting to UIBarButtonItem (From: Anthony Smith <email@hidden>)
 >Re: Reacting to UIBarButtonItem (From: Luke the Hiesterman <email@hidden>)
 >Re: Reacting to UIBarButtonItem (From: Anthony Smith <email@hidden>)
 >Re: Reacting to UIBarButtonItem (From: Luke the Hiesterman <email@hidden>)
 >Re: Reacting to UIBarButtonItem (From: Luke the Hiesterman <email@hidden>)

  • Prev by Date: Re: Reacting to UIBarButtonItem
  • Next by Date: Re: CoreData async fetch request
  • Previous by thread: Re: Reacting to UIBarButtonItem
  • Next by thread: debugging cursors
  • Index(es):
    • Date
    • Thread