0
这是我使用的代码。但它不工作(只执行一次)。我做错了什么?ios重复/反向动画不起作用
[UIView animateWithDuration:4.0 delay:0.0 options: UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse | UIViewAnimationOptionCurveEaseInOut animations:^{
NSLog(@"animating...");
laserView.frame = CGRectMake(0, scannerOverlayView.frame.size.height, scannerOverlayView.frame.size.width, 3);
} completion:^(BOOL done){
}];
您是从nib使用laserView吗?与自动布局?我试图用编程方式uiview和它的工作正常。 –
不,我正在以编程方式创建'laserView'。 –
我在叠加视图中添加'laserView'。 –