0
我將動畫CALayer移動,出於某種原因,我不斷收到屏幕上的這些細白線...這不是我的設備,我可以向您保證,我在這裏設置了CALayer:CALayer細白線
dodgelayer=nil;
dodgelayer= [CALayer layer];
dodgelayer.backgroundColor = [UIColor blueColor].CGColor;
dodgelayer.frame = CGRectMake(190, 80, 50, 50);
dodgelayer.borderColor = [UIColor whiteColor].CGColor;
dodgelayer.borderWidth = 2.0;
dodgelayer.cornerRadius = 50.0;
,我怎麼製作動畫:
CAKeyframeAnimation *anim = [CAKeyframeAnimation animationWithKeyPath:@"position"];
values = [NSArray arrayWithObjects:[NSValue valueWithCGPoint: CGPointMake(aLayer.frame.origin.x+25,aLayer.frame.origin.y+25)], [NSValue valueWithCGPoint: CGPointMake(point.x,point.y)], nil];
[anim setValues:values];
[anim setDuration:0.7];
anim.removedOnCompletion=NO;
anim.fillMode = kCAFillModeForwards;
anim.timingFunction=[CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut];
sublayer.shouldRasterize=YES;
[sublayer addAnimation:anim forKey:@"position"];
老實說,我不知道是什麼使這些東西白線出現,但我可以告訴你,他們的動畫中出現...即時難倒這任何幫助將不勝感激
你可以添加截圖嗎? –