iphone - Disabling a button doesn't work -


i got button want disable when method getting called:

- (void)disablesendbutton {     nslog(@"disablesendbutton method");     self.sendbtn.enabled = no;     //[self.sendbtn setenabled:no]; } 

header file property button: @property (strong, nonatomic) iboutlet uibutton *sendbtn; , synthesize it.

disablesendbutton method gets printed out button stays enabled... weird , don't know how can fix this. viewcontroller called sendviewcontroller , somewhere else in program [sendviewcontroller.sendbtn setenabled:no]; , works expected. other don't enable or disable button...

edit:

sendviewcontroller = [self.storyboard instantiateviewcontrollerwithidentifier:@"sendview"]; if(self.sendbuttonisenabled == no){     //sendviewcontroller.sendbtn.enabled = no; // doesn't work     //[sendviewcontroller.sendbtn setenabled:no]; // doesn't work     [sendviewcontroller disablesendbutton]; } 

call method in viewdidload....

self.sendbtn.enabled = no; 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -