I have a trigger to catch the button click on my controller like this
[saveButton addTarget:self action:@selector(save:) forControlEvents:UIControlEventTouchUpInside];
and the relevant function is
- (void)save:(id)sender {
//implementation code
}
How do call this function in another function, I try to call this function like as follow but it showing error.
(void)checkStatus{
if(somecondition){
[self save];
}
}
Note that I am new to iOS and Objective-C and I am editing a code of another developer. Please give me a solution.