Q:

How can I know which button I clicked to start an action inside the program?

I have 3 buttons which call the same function. I want to know inside the function which button called it. Is it possible to know it?

A:

Yes, you can use the sender argument. If you have an IBOutlet called buttonOne, you can check inside the IBAction method like this:
- (IBAction) buttonClicked:(id) sender
{
    if (sender == buttonOne)
    {
        NSLog(@"Button one was pressed.");
    }
}

Alternatively, assign each of your buttons a tag, and use the sender's tag property (the following example assumes that buttonOne was assigned the tag value “1”):
- (IBAction) buttonClicked:(id) sender
{
    if ([sender tag] == 1)
    {
        NSLog(@"Button one was pressed.");
    }
}

