views:

27

answers:

1

hil,

can someone tell me how i can scale an UIButton on touch? the button should scale up like 10%.

thanks in advance!

+3  A: 

Call

button.transform = CGAffineTransformMakeScale(1.1,1.1);

In button pressed handler.

Or if you want to scale with animation:

[UIView beginAnimations:@"ScaleButton" context:NULL];
[UIView setAnimationDuration: 0.5f];
button.transform = CGAffineTransformMakeScale(1.1,1.1);
[UIView commitAnimations];
Vladimir
okay cool and how can i combine this with a touch event?
Tronic
sorry, don't understand what do you mean exactly...
Vladimir
i mean, how i can combine this code with the event, when pressing a button.
Tronic