I really have no idea how this is done, it should be simple but i just cant get it
i have an IBAction and void and want to do this:
-(IBAction)pass{
int VariableX = 10;
[self getVar]; ---> send var to -(void)getVar
}
-(void)getVar{
get the VariableX
if(VariableX=10){
do something
}
}
declare getVar function to get one (integer) parameter:
Then call it the following way:
Generally the syntax of method declaration in objective-c is: