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'。 –