views:

140

answers:

1
self.navigationItem.rightBarButtonItem.enabled = FALSE;
[activityIndicator startAnimating];
//[myview sendSubviewToBack:self.view];
//self.view.hidden= TRUE;
myview.hidden= FALSE;
activityIndicator.hidden= FALSE;
dt = [[DateTime alloc] init];

This is my method in this when user click on leftbar button of navigation this method fires here i want to disable the button but its not getting disable and i checked my code i am not enabling it anywhere.......Please help me

+1  A: 

If properties aren't initialised properly in Objective-C you won't see any errors, the statement just won't get executed..

My first guess would be that you're calling a method on a nil reference.

Use the debugger to see whether the rightBarButtonItem has been set up properly.

Steve Neal