Iphone 从右向左设置图像动画或移动图像
我写这段代码是为了将图像从左向右移动,它工作得很好。 但是,现在我想从右到左做这个Iphone 从右向左设置图像动画或移动图像,iphone,objective-c,ipad,Iphone,Objective C,Ipad,我写这段代码是为了将图像从左向右移动,它工作得很好。 但是,现在我想从右到左做这个 [UIView animateWithDuration:20.0 delay:0.0 options: UIViewAnimationOptionAllowUserInteraction + UIViewAnimationOptionRepeat +UIViewAnimationOptionCurveLinear animations:^{imageView.frame = CGRectMake(x, 0, 12
[UIView animateWithDuration:20.0
delay:0.0
options: UIViewAnimationOptionAllowUserInteraction + UIViewAnimationOptionRepeat +UIViewAnimationOptionCurveLinear
animations:^{imageView.frame = CGRectMake(x, 0, 12000, 768);
}
completion:nil];
请帮帮我。
谢谢。更改图像视图框的X坐标 下面使用
[UIView animateWithDuration:20.0
delay:0.0
options: UIViewAnimationOptionAllowUserInteraction + UIViewAnimationOptionRepeat +UIViewAnimationOptionCurveLinear
animations:^{imageView.frame = CGRectMake(0, 0, 12000, 768);
}
completion:nil];
有趣的提示:你也可以做如下的CGRect:(CGRect){.origin.x=0,.size.width=12000,.size.height=768}whee@安德鲁·普利奥特:我已经在回答中提到了同样的CGRect:)我只是一个C99迷,好吧。