我的设置有问题UIViewAnimationOptionAutoReverse.这是我的代码.
CALayer *aniLayer = act.viewToChange.layer;
[UIView animateWithDuration:2.0 delay:1.0 options:(UIViewAnimationCurveLinear | UIViewAnimationOptionAutoreverse) animations:^{
viewToAnimate.frame = GCRectMake(1,1,100,100);
[aniLayer setValue:[NSNumber numberWithFloat:degreesToRadians(34)] forKeyPath:@"transform.rotation"];
} completion:nil ];
Run Code Online (Sandbox Code Playgroud)
问题是,在动画反转后,视图会跳回到动画块中设置的帧.我希望视图成长并"取消"并停在原来的位置.
有没有编程两个连续动画的解决方案?
当我的应用程序退出后台时动画停止了.这是正常的.但我想从当前状态重新启动我的动画.如果没有我到处偷拍,我怎么做到这一点.
[UIView animateWithDuration:60 delay:0 options:(UIViewAnimationOptionCurveLinear |UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat | UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionBeginFromCurrentState) animations:^{
[bg setFrame:CGRectMake(0, 0, 1378, 1005)];
} completion:nil];
Run Code Online (Sandbox Code Playgroud)
我尝试在动画前放置一个设置框架,但这只是让它快速捕捉.
[bg setFrame:CGRectMake(0, 0, 1378, 1005)];
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
所以我hava记录包含一个CKReference List字段.
现在我想批量获取所有引用的(通过这个CKReferences列表)记录(来自另一种类型).
有任何想法吗?
ios ×3
animation ×1
ckrecord ×1
ckreference ×1
cloudkit ×1
cocoa-touch ×1
ipad ×1
iphone ×1
objective-c ×1