Animating frame width on UIButton with background image
Animating frame width on UIButton with background image
- Subject: Animating frame width on UIButton with background image
- From: Bryan Hansen <email@hidden>
- Date: Thu, 13 Nov 2008 05:37:29 -0800
Is it possible to animate the width of a UIButton of
UIButtonStyleCustom type? I have an animation on frame size which
works fine when the UIButton is a UIButtonTypeRoundedRect. But has no
visible affect when I am using a UIButtonStyleCustom with background
image. I am trying to use a background image that has
stretchableImageWithLeftCapWidth, but I have also noticed that a
normal UIImage as the background fails to animate as well. My
animation code is here:
[UIView beginAnimations:nil context:@"MyAnimation"];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.25];
CGRect tempFrame = myButton.frame;
tempFrame.size.width = tempFrame.size.width + 100.0f;
myButton.frame = tempFrame;
[UIView commitAnimations];
Thanks for the help!
Bryan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden