开发者

How to disable the right bar button of navigation

开发者 https://www.devze.com 2022-12-27 07:32 出处:网络
self.navigationItem.rightBarButtonItem.enabled = FALSE; [activityIndicator startAnimating]; //[myview sendSubviewToBack:self.view];
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

精彩评论

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