开发者

How to disable the right bar button of navigation

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


Just

self.navigationItem.rightBarButtonItem.enabled = NO;


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜