Tag: beginanimations

UIViewanimation改变button的大小

我开始尝试从应用程序商店重新创build购买button,需要2阶段点击才能购买。 我要animationbutton扩大。 到目前为止,我有这个 [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.75]; sender.autoresizesSubviews = NO; sender.clipsToBounds = NO; sender.frame = CGRectMake(63,326,200,37); [UIView commitAnimations]; 这只是使button变大,它根本不animation。 我做错了什么或有其他人实现了这种types的button行为? 编辑: – (IBAction) buyButtonAction: (UIButton *) sender { [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.5]; [UIView setAnimationDelay:0.5]; [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; sender.clipsToBounds = NO; sender.frame = CGRectMake( CGRectGetMinX( sender.frame) – 30, CGRectGetMinY(sender.frame), 200, 37); [sender setTitle:@"Touched Touched Touched" […]