views:

162

answers:

1

I have the following piece of code

- (IBAction)buttonPressed: (id) sender
{
 UIButton *button = (UIButton*) sender;
 NSLog(@"Clicked button is: %d", button.currentTitle);
}

The output is:

Clicked button is: 26317696

Why is not displaying the title of the button which is "A"?

+1  A: 

(As requested)

%d is not the correct format specifier to use.

Anon.