Question: If I have this function for button click

```
-(IBAction)loginButton:(UIButton *)sender{ }

```

How can I call this button function from this another method

```
-(void)increaseAmount {
myNumber = myNumber+0.01;

if (myNumber >= 1) {

    [self loginButton:sender];   

}

progressViewAuto.progress = myNumber;}

```

I have tried the above code but getting error that USE OF UNDECLARED IDENTIFIER 'sender'

Answer: 
And, if you want to be perfectly correct, you can link your UIButton to `IBOutlet UIButton* theLoginButton;` and then say `[self loginButton:theLoginButton];`.

But this would only be needed if you actually reference the sender in your loginButton routine, and that's the exception rather than the rule.
You probably just want to send `nil`, like this:

```
[self loginButton:nil];

```