Change certain values within method

Posted by Grant Wilkinson on Stack Overflow See other posts from Stack Overflow or by Grant Wilkinson
Published on 2012-04-04T05:25:42Z Indexed on 2012/04/04 5:29 UTC
Read the original article Hit count: 219

Filed under:
|
|

I have the following code with a bool if statement inside and in another method I change the value of the bool and i know i need to recall the method [self someMethod]; but I just want to reflect the changes in the if statement and not recall everything else again, how do i do this? thanks

-(void)someMethod 
{  
  //start my code here

   if (boolvalueisTrue)    
      {
      //change this part only    
      }
}

-(void)changeBool {    
    boolvalueisTrue = TRUE;    
    [self someMethod];    
    //instead of calling the whole method i just want to reflect
    //the changes inside my if statement        
}

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about xcode