UIBarButtonItem NOT sending Action
Ok guys i am stumped.
My setup is for navigation-based application. Within IB, the XIB view controller being loaded in contains my main display. Within this display is a UIView. Within the UIView is a UIToolbar. Within the UIToolbar is a UIBarButtonItem.
I've created a method within the back-end view controller class to handle the bar button item. Within IB i associate the "Sent Actions" - Selector to the File Owner (MyUIViewController) method "BarButton_Click".
For the record i also tried creating the bar button item programmatically within the view controller View_load and adding to the IBOutlet toolbar:
UIBarButtonItem *bb = [[UIBarButtonItem alloc] initWithTitle: @"Click Me" style:UIBarButtonItemStyleBordered target:self action:@selector(BarButton_Click:)];
[tb setItems:[tb.items arrayByAddingObject:bb]];
When i run the simulator to test the bar button item being clicked, there is no action being sent to the method.
Any ideas why?
I am using iphone sdk v 2.2.1
Thanks
Last edited by quantass; 12-28-2009 at 09:11 PM.
|