我想在它所在的地方重新调整按钮的大小并延迟它,你能帮我吗?(发件人=UIButton)
我的功能:
-(IBAction)Animate: (id) sender
{
[sender setBackgroundImage:[UIImage imageNamed:@"Text Bg large.png"] forState:UIControlStateNormal];
CABasicAnimation *scale;
scale = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
scale.fromValue = [NSNumber numberWithFloat:1];
scale.toValue = [NSNumber numberWithFloat:1.3];
scale.duration = 1;
scale.removedOnCompletion = NO;
scale.repeatCount = 1;
[sender addAnimation:scale forKey:@""];
[sender setFrame:(CGRectMake(x, y, z, w))];
}
如果我希望该按钮保持在同一位置,并且在不手动输入值的情况下增长 1.3 倍,我对 x、y、z、w 使用什么。哦,我怎么能延迟这个操作?