I am doing a custom Segue on Storyboard and I have a button that contains this code:
[self performSegueWithIdentifier:@"line3" sender:sender];
By clicking on the button it works well. The problem I am running into that this code only works inside a button function not inside a void function. I tried clicking on the button and it works well. When I paste it inside just a void function it gives me an error complaining about the sender. I tried changing it to void but nothing happens. Can you give me some insight on to fix this issue. I am checking a UserDefault and it matches what I am looking for then I want to to perform this code: [self performSegueWithIdentifier:@"line3" sender:sender];
-(IBAction)LoginAttemp:(id)sender{
[self performSegueWithIdentifier:@"line3" sender:sender];
}
-(void) LoginFailed{
[self performSegueWithIdentifier:@"line3" sender:sender];
}
Error I Get:
Use of undeclared identifier ‘sender’
Any insight?
change
to
the sender is: